Opened 6 years ago

Closed 6 years ago

#11431 closed defect (fixed)

Possible time-zone problem with computing uptimes and downtimes

Reported by: karsten Owned by: rndm
Priority: Medium Milestone:
Component: Metrics/Globe Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Could it be that Globe interprets last_seen and last_restarted as datetimes in the user's local timezone?

I looked up a random non-running relay and found the following line in its Onionoo details file:

"last_seen":"2014-04-07 08:00:00",

It was 18:26:00 CEST when I looked up the relay in Globe, so 16:26:00 UTC. Globe told me the downtime was 10 hours 26 minutes. But it should have said 8 hours 26 minutes.

Similarly, I looked up another random relay, but this time one that was running. It's Onionoo details file contained this line:

"last_restarted":"2014-04-07 09:18:05"

I looked it up in Globe at 18:31:00 CEST, so 16:31:00 UTC, and Globe told me the uptime is 9 hours 13 minutes. It should have said 7 hours 13 minutes.

Child Tickets

Change History (4)

comment:1 in reply to:  description Changed 6 years ago by rndm

Replying to karsten:

Could it be that Globe interprets last_seen and last_restarted as datetimes in the user's local timezone?

This was the problem.
I changed every date interaction to use UTC: globe.rndm.de/canary/index-11431.html

comment:2 Changed 6 years ago by karsten

Looks good! Let me know when there's something to deploy. Thanks!

comment:3 Changed 6 years ago by rndm

I released v0.4.7 which includes the fix for this issue.
https://github.com/makepanic/globe/releases/tag/v0.4.7

comment:4 Changed 6 years ago by karsten

Resolution: fixed
Status: newclosed

Great. Deployed on globe.tpo. Thanks! Closing.

Note: See TracTickets for help on using tickets.