Comment 4 for bug 885163

Revision history for this message
StarSteve (info-astroworld) wrote :

I'm confused !?
I think this error has nothing to do with dst (Daylight Saving Time) transitions/changes, instead:

in tzData2011k: australasia
*** 532,590 ****
# From David Zuelke (2011-05-09):
# Subject: Samoa to move timezone from east to west of international date line
# ...
# From Mark Sim-Smith (2011-08-17):
# ...
# the essence is that at midnight 29 Dec (UTC-11 I suppose), Samoa
# changes from UTC-11 to UTC+13:

comment:
UTC-11 to UTC+13 = 24hours = 1440Minutes
datetime.timedelta does not alow Values > 1439 => ValueError: ... must be in -1439 .. 1439

see: http://docs.python.org/library/datetime.html?highlight=timedelta#datetime.timedelta
tzinfo.utcoffset(self, dt)
   Return offset of local time from UTC, in minutes east of UTC. If local time is west of UTC, this should be negative. Note that this is intended to be the total offset from UTC; for example, if a tzinfo object represents both time zone and DST adjustments, utcoffset() should return their sum. If the UTC offset isn’t known, return None. Else the value returned must be a timedelta object specifying a whole number of minutes in the range -1439 to 1439 inclusive (1440 = 24*60; the magnitude of the offset must be less than one day).

# ...
# ...
# Dateline Change skip Friday 30th Dec 2011
# Thursday 29th December 2011 23:59:59 Hours
# Saturday 31st December 2011 00:00:00 Hours

-stefan