diff options
author | Stuart Bishop <stuart@stuartbishop.net> | 2011-11-04 16:59:20 +0700 |
---|---|---|
committer | Stuart Bishop <stuart@stuartbishop.net> | 2011-11-04 16:59:20 +0700 |
commit | b3525169cedd766f0ee2d73672108c0720913dae (patch) | |
tree | dc49faa590d817e89314172b6cfc56dea8b549ad | |
parent | fc0e96ff5a2431aacde0141dbdae88282916c411 (diff) | |
download | pytz-b3525169cedd766f0ee2d73672108c0720913dae.tar.gz |
Add a test for Samoa switching from east to west of the international dateline
-rw-r--r-- | src/pytz/tests/test_tzinfo.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/pytz/tests/test_tzinfo.py b/src/pytz/tests/test_tzinfo.py index 1543fa8..0516857 100644 --- a/src/pytz/tests/test_tzinfo.py +++ b/src/pytz/tests/test_tzinfo.py @@ -533,6 +533,24 @@ class TahitiTestCase(USEasternDSTStartTestCase): } +class SamoaInternationalDateLineChange(USEasternDSTStartTestCase): + # At the end of 2011, Samoa will switch from being east of the + # international dateline to the west. There will be no Dec 30th + # 2011 and it will switch from UTC-11 to UTC+13. + tzinfo = pytz.timezone('Pacific/Apia') + transition_time = datetime(2011, 12, 30, 10, 0, 0, tzinfo=UTC) + before = { + 'tzname': 'WSDT', + 'utcoffset': timedelta(hours=-10), + 'dst': timedelta(hours=1), + } + after = { + 'tzname': 'WSDT', + 'utcoffset': timedelta(hours=14), + 'dst': timedelta(hours=1), + } + + class ReferenceUSEasternDSTStartTestCase(USEasternDSTStartTestCase): tzinfo = reference.Eastern def test_arithmetic(self): |