Open johnmckerrell opened 5 years ago
Ah, so appears this is a feature:
# Optional timezone, used for defining half-days of hotdesking
timezone: "Europe/London"
and
time = Time.now.utc
if LCConfig.tz
time = LCConfig.tz.utc_to_local(time)
end
today = Date.today.to_s
scansFile.write("#{uid}\t#{time}\n")
Annoying that we end up stating UTC when its not so I'll leave this open to see if we can fix that. If not maybe we just make sure the scans file does store UTC.
I’m not understanding why the string representation of a local time would expand to a UTC time?
While looking for a scan on the doorbots I found that they don't appear to be logging scans in the way we expect them to. The log file claims to be storing UTC times when in fact it appears to be using local time. I'm not sure where it's even getting the local time zone from but the following appears to suggest it:
As you can see the last scan was apparently at 20:00 UTC, when the time is actually 19:08 UTC. To confirm this was actually at 20:08 BST/local time.