Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
cb8db59c
Commit
cb8db59c
authored
Oct 23, 2007
by
Laurence Rowe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tidy up legacy time zones
parent
167496f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
lib/python/DateTime/DateTime.py
lib/python/DateTime/DateTime.py
+9
-9
lib/python/DateTime/tests/testDateTime.py
lib/python/DateTime/tests/testDateTime.py
+9
-1
No files found.
lib/python/DateTime/DateTime.py
View file @
cb8db59c
...
...
@@ -150,7 +150,7 @@ class _timezone:
class
_cache
:
_zlst
=
[
'Brazil/Acre'
,
'Brazil/
DeNoronha'
,
'Brazil/East
'
,
_zlst
=
[
'Brazil/Acre'
,
'Brazil/
East'
,
#'Brazil/DeNoronha
',
'Brazil/West'
,
'Canada/Atlantic'
,
'Canada/Central'
,
'Canada/Eastern'
,
'Canada/East-Saskatchewan'
,
'Canada/Mountain'
,
'Canada/Newfoundland'
,
...
...
@@ -184,17 +184,17 @@ class _cache:
'MEWT'
,
'SWT'
,
'FWT'
,
'EET'
,
'EEST'
,
'BT'
,
'ZP4'
,
'ZP5'
,
'ZP6'
,
'WAST'
,
'CCT'
,
'JST'
,
'EAST'
,
'GST'
,
'NZT'
,
'NZST'
,
'IDLE'
]
_zmap
=
{
'aest'
:
'GMT+10
00'
,
'aedt'
:
'GMT+1100
'
,
'aus eastern standard time'
:
'GMT+10
00
'
,
'sydney standard time'
:
'GMT+10
00
'
,
'tasmania standard time'
:
'GMT+10
00
'
,
'e. australia standard time'
:
'GMT+10
00
'
,
_zmap
=
{
'aest'
:
'GMT+10
'
,
'aedt'
:
'GMT+11
'
,
'aus eastern standard time'
:
'GMT+10'
,
'sydney standard time'
:
'GMT+10'
,
'tasmania standard time'
:
'GMT+10'
,
'e. australia standard time'
:
'GMT+10'
,
'aus central standard time'
:
'GMT+0930'
,
'cen. australia standard time'
:
'GMT+0930'
,
'w. australia standard time'
:
'GMT+
0800
'
,
'w. australia standard time'
:
'GMT+
8
'
,
'brazil/acre'
:
'Brazil/Acre'
,
'brazil/denoronha'
:
'Brazil/Denoronha'
,
#
'brazil/denoronha':'Brazil/Denoronha',
'brazil/east'
:
'Brazil/East'
,
'brazil/west'
:
'Brazil/West'
,
'canada/atlantic'
:
'Canada/Atlantic'
,
'canada/central'
:
'Canada/Central'
,
...
...
@@ -203,7 +203,7 @@ class _cache:
'canada/mountain'
:
'Canada/Mountain'
,
'canada/newfoundland'
:
'Canada/Newfoundland'
,
'canada/pacific'
:
'Canada/Pacific'
,
'canada/yukon'
:
'Canada/Yukon'
,
'central europe standard time'
:
'GMT+
0100
'
,
'central europe standard time'
:
'GMT+
1
'
,
'chile/continental'
:
'Chile/Continental'
,
'chile/easterisland'
:
'Chile/EasterIsland'
,
'cst'
:
'US/Central'
,
'cuba'
:
'Cuba'
,
'est'
:
'US/Eastern'
,
'egypt'
:
'Egypt'
,
...
...
lib/python/DateTime/tests/testDateTime.py
View file @
cb8db59c
...
...
@@ -17,7 +17,7 @@ import os
import
time
import
unittest
from
DateTime.DateTime
import
_findLocalTimeZoneName
from
DateTime.DateTime
import
_findLocalTimeZoneName
,
_cache
from
DateTime
import
DateTime
from
datetime
import
datetime
import
pytz
...
...
@@ -505,6 +505,14 @@ class DateTimeTests(unittest.TestCase):
dt4
=
DateTime
(
'2007-10-04T10:00:00+05:00'
)
sdt4
=
datetime
(
2007
,
10
,
4
,
5
,
0
)
self
.
assertEqual
(
dt4
.
utcdatetime
(),
sdt4
)
def
testLegacyTimezones
(
self
):
# check that all the legacy timezone names can actually be looked up
cache
=
_cache
()
for
key
in
cache
.
_zmap
.
keys
():
tz
=
cache
[
key
]
for
key
in
cache
.
_zlst
:
tz
=
cache
[
key
]
def
test_suite
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment