You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The time zone request seems to be parsed correctly but the service is returning incorrect data (says there is DST but that is no longer true). The bug is in the service or the service request (I can't tell), not in the watch face code. Example:
Request: https://script.google.com/macros/s/AKfycbwPas8x0JMVWRhLaraJSJUcTkdznRifXPDovVZh8mviaf8cTw/exec?city=Rio%20de%20Janeiro
Response:
{"requestCity":"Rio de Janeiro","city":"Rio de Janeiro","current":{"gmtOffset":-7200,"dst":true},"next":{"when":1613872800,"gmtOffset":-10800,"dst":false}}
Which is correctly parsed as GMT-2, but the correct time is GMT-3, and there are no upcoming DST time changes. See here: https://www.timeanddate.com/time/change/brazil/rio-de-janeiro
The text was updated successfully, but these errors were encountered:
Of course, current time is less than "when" in the query result in my previous comment.
I implemented a workaround: any city that ends in "*" will use the timezone for the city ignoring any DST information (will always pick the gmtOffset where DST is false, if any).
@WarpedPixel thanks for reporting this. The service is based on a Google Sheet containing data from TimeZoneDB. I implemented this service, rather than using the TimeZoneDB API directly, either because I wanted more control over the data returned from the API call, or to avoid breaking their terms of service (I forget which). I didn't realise at the time, that time zone data can change surprisingly frequently: a colleague of mine works in Volgograd, where the time zone has changed twice since I implemented the service back in October 2018.
I'll assign myself this issue, and will try and get round to updating the Google Sheet shortly, and also check if there is a way, either directly from the watch, or indirectly via the existing service, to query the live TimeZoneDB API. Thanks!
There is a good video on YouTube about developers and time zones and why you should rely on APIs instead of doing it yourself... ;) https://www.youtube.com/watch?v=-5wpm-gesOY
The time zone request seems to be parsed correctly but the service is returning incorrect data (says there is DST but that is no longer true). The bug is in the service or the service request (I can't tell), not in the watch face code. Example:
Request:
https://script.google.com/macros/s/AKfycbwPas8x0JMVWRhLaraJSJUcTkdznRifXPDovVZh8mviaf8cTw/exec?city=Rio%20de%20Janeiro
Response:
{"requestCity":"Rio de Janeiro","city":"Rio de Janeiro","current":{"gmtOffset":-7200,"dst":true},"next":{"when":1613872800,"gmtOffset":-10800,"dst":false}}
Which is correctly parsed as GMT-2, but the correct time is GMT-3, and there are no upcoming DST time changes. See here: https://www.timeanddate.com/time/change/brazil/rio-de-janeiro
The text was updated successfully, but these errors were encountered: