[Datetime-SIG] Are there any "correct" implementations of tzinfo?

Tim Peters tim.peters at gmail.com
Sun Sep 13 17:27:30 CEST 2015


[Alex]
>>I will try to create a  zoneinfo wrapping prototype as well, but I will
>>probably "cheat" and build it on top of pytz.

[Laura Creighton]
> My question, is whether it will handle Creighton, Saskatchewan, Canada?
> Creighton is an odd little place.  Like all of Saskatchewan, it is
> in the Central time zone, even though you would expect it to be
> in the Mountain time zone based on its location on the globe.
> The people of Saskatchewan have decided not to adopt Daylight
> Savings time.  Except for the people of Creighton (and
> nearby Denare Beach) -- who _do_ observe Daylight savings time.
>
> makes for an interesting corner case, one that I remember for
> personal (and not economic, or professional) reasons.

Hi, Laura!  By "zoneinfo" here, we mean the IANA (aka "Olson") time
zone database, which is ubiquitous on (at least) Linux:

    https://www.iana.org/time-zones

So "will a wrapping of zoneinfo handle XYZ?" isn't so much a question
about the wrapping as about what's in the IANA database.

Best guess is that Creighton's rules are covered by that database's
America/Winnipeg entries.  It's generally true that the database makes
no attempt to name every location on the planet.  Instead it uses
names of the form "general/specific" where "general" limits the scope
to some large area of the Earth (here "America" really means "North
America"), and "specific" names a well-known city within that area.

For example, I live in Ashland, Wisconsin (extreme far north in that
state, on Lake Superior), but so far as IANA is concerned my time zone
rules are called "America/Chicago" (some 460 air miles SSE, in a
different state).

Just for fun, I'll paste in the comments from the Saskatchewan section
of IANA's "northamerica" data file (a plain text source file from
which binary tzfiles like America/Chicago and America/Winnipeg are
generated).  You'll see Creighton mentioned if you stay alert ;-)

# Saskatchewan

# From Mark Brader (2003-07-26):
# The first actual adoption of DST in Canada was at the municipal
# level.  As the [Toronto] Star put it (1912-06-07), "While people
# elsewhere have long been talking of legislation to save daylight,
# the city of Moose Jaw [Saskatchewan] has acted on its own hook."
# DST in Moose Jaw began on Saturday, 1912-06-01 (no time mentioned:
# presumably late evening, as below), and would run until "the end of
# the summer".  The discrepancy between municipal time and railroad
# time was noted.

# From Paul Eggert (2003-07-27):
# Willett (1914-03) notes that DST "has been in operation ... in the
# City of Moose Jaw, Saskatchewan, for one year."

# From Paul Eggert (2006-03-22):
# Shanks & Pottenger say that since 1970 this region has mostly been as Regina.
# Some western towns (e.g. Swift Current) switched from MST/MDT to CST in 1972.
# Other western towns (e.g. Lloydminster) are like Edmonton.
# Matthews and Vincent (1998) write that Denare Beach and Creighton
# are like Winnipeg, in violation of Saskatchewan law.

# From W. Jones (1992-11-06):
# The. . .below is based on information I got from our law library, the
# provincial archives, and the provincial Community Services department.
# A precise history would require digging through newspaper archives, and
# since you didn't say what you wanted, I didn't bother.
#
# Saskatchewan is split by a time zone meridian (105W) and over the years
# the boundary became pretty ragged as communities near it reevaluated
# their affiliations in one direction or the other.  In 1965 a provincial
# referendum favoured legislating common time practices.
#
# On 15 April 1966 the Time Act (c. T-14, Revised Statutes of
# Saskatchewan 1978) was proclaimed, and established that the eastern
# part of Saskatchewan would use CST year round, that districts in
# northwest Saskatchewan would by default follow CST but could opt to
# follow Mountain Time rules (thus 1 hour difference in the winter and
# zero in the summer), and that districts in southwest Saskatchewan would
# by default follow MT but could opt to follow CST.
#
# It took a few years for the dust to settle (I know one story of a town
# on one time zone having its school in another, such that a mom had to
# serve her family lunch in two shifts), but presently it seems that only
# a few towns on the border with Alberta (e.g. Lloydminster) follow MT
# rules any more; all other districts appear to have used CST year round
# since sometime in the 1960s.

# From Chris Walton (2006-06-26):
# The Saskatchewan time act which was last updated in 1996 is about 30 pages
# long and rather painful to read.
# http://www.qp.gov.sk.ca/documents/English/Statutes/Statutes/T14.pdf


More information about the Python-list mailing list