sysdiagnose PLBatteryAgent_EventBackward_Battery timestamp

How do I convert the timestamp in PLBatteryAgent_EventBackward_Battery of sysdiagnose into real time? I can't filter the data now.

WARNING A sysdiagnose log is one giant ball of implementation details. It’s fine to go rummaging in the log to investigate issues, but do not ship products that rely on these implementation details.

Testing this on a sysdiagnose log I have lying around on my hard disk, these look like a time interval (a floating point count of seconds) since the Unix epoch:

% sqlite3 ./logs/powerlogs/powerlog_2023-06-29_14-58_8ED20CBC.PLSQL
SQLite version 3.43.2 2023-10-10 13:08:14
Enter ".help" for usage hints.
sqlite> select timestamp from PLBatteryAgent_EventBackward_Battery;
1660575268.39297
…
import Foundation

print(Date(timeIntervalSince1970: 1660575268.39297))
// prints: 2022-08-15 14:54:28 +0000

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

sysdiagnose PLBatteryAgent_EventBackward_Battery timestamp
 
 
Q