Open jusso-dev opened 4 years ago
It's not a timezone issue, it's that AirRater doesn't actually update at 55 minutes past the hour. That's when they collect their data, but the API can take ten minutes to update. After *:55, we start a timer that checks for a new update every minute. The truth is that it's really "Next update Tue 10:55-11:05.
Going off the API the last update was 10:55, that's the best source of information we have without making assumptions, therefore, the sites an hour off.
It now looks like the time stamp is UTC and not AEST. At 10:48 pm it was reading "hourly, last update: Tue 10:55am, next update: Tue 11:55am" The time series is the same.
"Current Air Quality hourly, last update: Tue 09:55:00, next update: Tue 10:55:00"
This was captured at 11:02 AM AESDT.
Purposed fix:
Either pass the timezone option to the new Date() object, or change it server-side - https://www.hostinger.com/tutorials/htaccess/how-to-change-timezone-using-htaccess
I propose the JavaScript option to make the solution hosting platform agnostic.