caarmen / network-monitor

A network monitor tool for Android that executes an http GET to google.com every x seconds and logs the results into a file.
74 stars 27 forks source link

Include ISO 8601 timezone in timestamp #129

Open ypid opened 4 years ago

ypid commented 4 years ago

Description:

Timezone is not stored which leads to all kinds of issues when you change timezones of your device. I just tested this and timestamps of the app are always assumed to be in local time.

I would propose to write a RFC 3339 complaint timestamp like this: 2019-11-29 21:17:45+01:00

It is still local time, but with the timezone offset, you don’t lose the link to UTC and thus when the event happened regardless of the timezone.

Steps to reproduce:

-> Old logs are incorrectly translated into the new timezone making it impossible to relay on the timestamp to tell when the log entry was actually emitted.

Environment: