somakeit / door-controller2

A new door controller for a new space, where all the previous hardware is broken and we can't replace it.
1 stars 0 forks source link

Door is sending scans in Z time not A time. #21

Closed brackendawson closed 2 years ago

brackendawson commented 8 years ago

time.time() returns seconds since epoch in local time.

benjie commented 8 years ago

"seconds since epoch" doesn't change based on timezone, daylight savings, or other such things - it's the number of seconds since 1970-01-01T00:00:00Z which is timezone independent.

(Though technically it's not, since it doesn't account for leap seconds and the like - it factors all days as having 24_60_60 seconds. But near enough.)

benjie commented 8 years ago

Oh; I see - you mean sending a string rather than a number. Gotya.

brackendawson commented 8 years ago

No, I think I was wrong. time.time is reporting in UTC.

Something is causing the members area to show a scan times that coincide with UTC but are apparently localtime, that should be BST.

tl;dr the scans in the members area are an hour behind.

benjie commented 8 years ago

The members area is probably displaying them in UTC?

benjie commented 8 years ago

Filed against members area. Really need to add an admin role to the members area so I can see the admin panel again!

brackendawson commented 2 years ago

Not going to fix this as the code is no longer used.