Browsers, time zones, Chrome 67 Error (historic timezone changes)

I’m going to assume you’re in the Europe/Moscow time zone – that seems likely given the output you’ve provided.

In 1900, the Europe/Moscow time zone had an offset of +02:30:17, according to the IANA time zone database. Presumably Chrome is rounding down to 02:30 to avoid sub-minute offsets, but it’s returning appropriate data as far as I can see. The offset in Russia first became a whole number of hours in 1919, at least according to the IANA database.

Arguably you should be asking why the other browsers are not doing that – but more likely, you should change your code to not ask for time zone information prior to 1970. The IANA database aims to provide accurate data from the Unix epoch onwards; anything earlier is very much “best effort”. From the theory file:

Clock transitions before 1970 are recorded for each such location, because most systems support timestamps before 1970 and could misbehave if data entries were omitted for pre-1970 transitions. However, the database is not designed for and does not suffice for applications requiring accurate handling of all past times everywhere, as it would take far too much effort and guesswork to record all details of pre-1970 civil timekeeping. Although some information outside the scope of the database is collected in a file backzone that is distributed along with the database proper, this file is less reliable and does not necessarily follow database guidelines.

In terms of why you’re seeing this with Chrome 67 if you weren’t seeing it with previous versions of Chrome – I wonder whether Chrome has just started bundling IANA time zone data rather than using the OS data.

Leave a Comment