Hi all
I have set up my enviro indoor to upload to adafruit.io. This is all working, and I see the data in the feeds. However, the time is incorrect.
If I look at what I am uploading, the data shows :
{"nickname": "wendy", "uid": "xxxx", "timestamp": "2024-05-27T23:12:25Z", "readings": {"temperature": 73.778, "humidity": 54.82513, "pressure": 1001.33, "gas_resistance": 15799, "aqi": 11.9, "luminance": 14, "color_temperature": 6288}, "model": "indoor"}
When I look in the data feeds, I see :
I have added print statements to multiple places in the code, and everywhere looks like the time is correct. I even read the file before uploading, and it has my correct local time.
But the time in adafuit.io is always 4 hours behind. Which seems like its defaulting to UTC time.
Anyone seen this and know how to fix it?
Thanks!
That data looks to be in UTC (23:12:25Z); adafruit is rendering it in … EDT?
Check what timezone adafruit thinks you’re in (Account / Profile)
Yeah my settings in adafruit.io are set to EST.
So what I am sending is in EST, and my account is set to EST. Why is the data not in the correct time?!
Because the enviro isn’t in EST; skimming the code it just sets the time via NTP (which will be in UTC) and doesn’t look to have any concept of timezones.
You could potentially bodge around it by telling Adafruit you’re in a different timezone (either UTC, or UTC-8, can’t quite get my head around which direction you need to go!) but obviously that’s only an option if you’re not using it for anything else that might be in the right timezone.
The other option would be to add timezone support to the Enviro firmware (or even just hack it to hardcode it to convert NTP time to EST)