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
1d88685b
Commit
1d88685b
authored
Mar 14, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged issue fixes from 2.3 branch
parent
4d674598
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
21 deletions
+17
-21
lib/python/DateTime/DateTime.py
lib/python/DateTime/DateTime.py
+17
-21
No files found.
lib/python/DateTime/DateTime.py
View file @
1d88685b
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""Encapsulation of date/time values"""
"""Encapsulation of date/time values"""
__version__
=
'$Revision: 1.6
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.6
2
$'
[
11
:
-
2
]
import
sys
,
os
,
math
,
regex
,
ts_regex
,
DateTimeZone
import
sys
,
os
,
math
,
regex
,
ts_regex
,
DateTimeZone
...
@@ -187,7 +187,7 @@ class _cache:
...
@@ -187,7 +187,7 @@ class _cache:
'
UT
','
BST
','
CDT
','
MEST
','
SST
','
FST
','
WADT
','
EADT
','
NZDT
',
'
UT
','
BST
','
CDT
','
MEST
','
SST
','
FST
','
WADT
','
EADT
','
NZDT
',
'
WET
','
WAT
','
AT
','
AST
','
NT
','
IDLW
','
CET
','
MET
',
'
WET
','
WAT
','
AT
','
AST
','
NT
','
IDLW
','
CET
','
MET
',
'
MEWT
','
SWT
','
FWT
','
EET
','
BT
','
ZP4
','
ZP5
','
ZP6
',
'
MEWT
','
SWT
','
FWT
','
EET
','
EEST
','
BT
','
ZP4
','
ZP5
','
ZP6
',
'
WAST
','
CCT
','
JST
','
EAST
','
GST
','
NZT
','
NZST
','
IDLE
']
'
WAST
','
CCT
','
JST
','
EAST
','
GST
','
NZT
','
NZST
','
IDLE
']
...
@@ -292,6 +292,7 @@ class _cache:
...
@@ -292,6 +292,7 @@ class _cache:
'
nt
':'
GMT
-
11
', '
idlw
':'
GMT
-
12
', '
cet
':'
GMT
+
1
', '
cest
':'
GMT
+
2
',
'
nt
':'
GMT
-
11
', '
idlw
':'
GMT
-
12
', '
cet
':'
GMT
+
1
', '
cest
':'
GMT
+
2
',
'
met
':'
GMT
+
1
',
'
met
':'
GMT
+
1
',
'
mewt
':'
GMT
+
1
', '
swt
':'
GMT
+
1
', '
fwt
':'
GMT
+
1
', '
eet
':'
GMT
+
2
',
'
mewt
':'
GMT
+
1
', '
swt
':'
GMT
+
1
', '
fwt
':'
GMT
+
1
', '
eet
':'
GMT
+
2
',
'
eest
':'
GMT
+
3
',
'
bt
':'
GMT
+
3
', '
zp4
':'
GMT
+
4
', '
zp5
':'
GMT
+
5
', '
zp6
':'
GMT
+
6
',
'
bt
':'
GMT
+
3
', '
zp4
':'
GMT
+
4
', '
zp5
':'
GMT
+
5
', '
zp6
':'
GMT
+
6
',
'
wast
':'
GMT
+
7
', '
cct
':'
GMT
+
8
', '
jst
':'
GMT
+
9
', '
east
':'
GMT
+
10
',
'
wast
':'
GMT
+
7
', '
cct
':'
GMT
+
8
', '
jst
':'
GMT
+
9
', '
east
':'
GMT
+
10
',
'
gst
':'
GMT
+
10
', '
nzt
':'
GMT
+
12
', '
nzst
':'
GMT
+
12
', '
idle
':'
GMT
+
12
',
'
gst
':'
GMT
+
10
', '
nzt
':'
GMT
+
12
', '
nzst
':'
GMT
+
12
', '
idle
':'
GMT
+
12
',
...
@@ -325,26 +326,21 @@ def _findLocalTimeZoneName(isDST):
...
@@ -325,26 +326,21 @@ def _findLocalTimeZoneName(isDST):
_localzone = _cache._zmap[lower(tzname[isDST])]
_localzone = _cache._zmap[lower(tzname[isDST])]
except:
except:
try:
try:
# Get the name of the current time zone, not
# Generate a GMT-offset zone name.
# depending on DST.
if isDST:
_localzone = _cache._zmap[lower(tzname[0])]
localzone = altzone
else:
localzone = timezone
offset=(-localzone/(60*60))
majorOffset=int(offset)
if majorOffset != 0 :
minorOffset=abs(int((offset % majorOffset) * 60.0))
else: minorOffset = 0
m=majorOffset >= 0 and '
+
' or ''
lz='
%
s
%
0.02
d
%
0.02
d
' % (m, majorOffset, minorOffset)
_localzone = _cache._zmap[lower('
GMT
%
s
' % lz)]
except:
except:
try:
_localzone = ''
# Generate a GMT-offset zone name.
if isDST:
localzone = altzone
else:
localzone = timezone
offset=(-localzone/(60*60))
majorOffset=int(offset)
if majorOffset != 0 :
minorOffset=abs(int((offset % majorOffset) * 60.0))
else: minorOffset = 0
m=majorOffset >= 0 and '
+
' or ''
lz='
%
s
%
0.02
d
%
0.02
d
' % (m, majorOffset, minorOffset)
_localzone = _cache._zmap[lower('
GMT
%
s
' % lz)]
except:
_localzone = ''
return _localzone
return _localzone
# Some utility functions for calculating dates:
# Some utility functions for calculating dates:
...
...
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