sysdiagnose icon indicating copy to clipboard operation
sysdiagnose copied to clipboard

[parser] crashlogs: extract timezone from image

Open cvandeplas opened this issue 1 year ago • 6 comments

The case (metadata) needs to know the timezone of the phone. Some filenames contain a timestamp, in the case of crashlogs it's local time. So to parse the date properly we need to know the phone timezone.

cvandeplas avatar Aug 28 '24 13:08 cvandeplas

Annoyingly, if we find a place where the current timezone is configured at sysdiagnose creation time, it might still be different than for example the crashlog timestamp. Why? The owner of the phone might have been travelling at a certain point in time, and be in a different timezone.

However extracting the latest known timezone would definitely help to better estimate reality

cvandeplas avatar Aug 30 '24 05:08 cvandeplas

powerlogs contain(some) info about timezone

cvandeplas avatar Sep 01 '24 05:09 cvandeplas

Launch Time: of the crash the TZ is not set ?

adulau avatar Sep 01 '24 07:09 adulau

The summaries/crashes_and_spins.log file contains a list of crashlog files that were present on the phone, but may not be included in the sysdiagnose tar.gz because they are too old. The timestamp of the crashlog filename seems to be based on local time.

However, the crashlog itself (ips file) contain a timestamp with timezone.
So we're currently able to capture the exact time for all these IPS files, but need to do lookup-magic if we want to discover the timezone of the older crashes from which we do not have the IPS files in the sysdiagnose archive.

cvandeplas avatar Sep 03 '24 04:09 cvandeplas

What about the filename of the sysdiagnose file itself? It contains the the timestamp in iso format, where you can see the time deviation from UTC. Would that work?

dario-br avatar Sep 13 '24 08:09 dario-br

For now we extract the time and timezone from the sysdiagnose.log file, this is captured in the this.sysdiagnose_creation_datetime variable. However, as explained, this is the timezone at time of sysdiagnose creation, which is not necessarily the same as the timezone when the crash occurred.

cvandeplas avatar Nov 07 '24 07:11 cvandeplas