1
=== modified file 'pytz/pytz/tests/test_tzinfo.py'
2
--- pytz.orig/pytz/tests/test_tzinfo.py 2011-11-04 09:32:28 +0000
3
+++ pytz/pytz/tests/test_tzinfo.py 2011-11-04 09:59:20 +0000
8
+class SamoaInternationalDateLineChange(USEasternDSTStartTestCase):
9
+ # At the end of 2011, Samoa will switch from being east of the
10
+ # international dateline to the west. There will be no Dec 30th
11
+ # 2011 and it will switch from UTC-11 to UTC+13.
12
+ tzinfo = pytz.timezone('Pacific/Apia')
13
+ transition_time = datetime(2011, 12, 30, 10, 0, 0, tzinfo=UTC)
16
+ 'utcoffset': timedelta(hours=-10),
17
+ 'dst': timedelta(hours=1),
21
+ 'utcoffset': timedelta(hours=14),
22
+ 'dst': timedelta(hours=1),
26
class ReferenceUSEasternDSTStartTestCase(USEasternDSTStartTestCase):
27
tzinfo = reference.Eastern
28
def test_arithmetic(self):
30
=== modified file 'src/pytz/tzfile.py'
31
--- src/pytz/tzfile.py 2011-02-08 10:18:52 +0000
32
+++ src/pytz/tzfile.py 2011-11-04 10:32:42 +0000
35
dst = inf[0] - prev_inf[0] # dst offset
37
- if dst <= 0: # Bad dst? Look further.
38
+ # Bad dst? Look further. DST > 24 hours happens when
39
+ # a timzone has moved across the international dateline.
40
+ if dst <= 0 or dst > 3600*3:
41
for j in range(i+1, len(transitions)):
42
stdinf = ttinfo[lindexes[j]]