Confusion in the use of 'timezone'

Created by: Lester Caine, Last modification: 21 Sep 2014 (15:36 UTC)

During the discussions on whether we should be using time zone or if timezone was acceptable, a few interesting miss uses of timezone came to light.

XML Schema Part 2: Datatypes Second Edition Timezones defines as a fixed minute accurate offset with no provision to identify the daylight saving element.


datetime.timezone also defines timezone as a fixed offset
The timezone class is a subclass of tzinfo, each instance of which represents a timezone defined by a fixed offset from UTC. Note that objects of this class cannot be used to represent timezone information in the locations where different offsets are used in different days of the year or where historical changes have been made to civil time.


TimeZone class seems to be restriced to minute accuracy, but RawOffset allows millisecond accuracy. SimpleTimeZone elements seem to allow for a DST schedule, but there is no provision for anything more than a single set of values as far as I can see.

Investigating ways to identify users timezone

Moment Timezone - javascript library

Code available on github
Seems to be using truncated view of data with minute resolution but not fully reviewed as yet. It's packed data format is interesting as a base to build off for internal storage.


tzdata-javascript is a JavaScript library that enables the usage of multiple timezones on the same webpage without the assistance of the user.  It is another source of tz data in the browser, but data format sems rather large. It does use second accuracy, but may suffer from problems on windows when using times outsdie the current year.