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
ca8fad92
Commit
ca8fad92
authored
Jul 05, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector # 2375: DateTime constructor was unable to handle unicode
strings.
parent
21a5406c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/python/DateTime/DateTime.py
lib/python/DateTime/DateTime.py
+4
-4
No files found.
lib/python/DateTime/DateTime.py
View file @
ca8fad92
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Encapsulation of date/time values"""
__version__
=
'$Revision: 1.6
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.6
9
$'
[
11
:
-
2
]
import
re
,
sys
,
os
,
math
,
DateTimeZone
...
...
@@ -92,7 +92,7 @@ from string import strip,split,upper,lower,atoi,atof,find,join
from
time
import
time
,
gmtime
,
localtime
,
asctime
from
time
import
timezone
,
strftime
,
mktime
from
time
import
daylight
,
timezone
,
altzone
from
types
import
InstanceType
,
IntType
,
FloatType
,
StringType
from
types
import
InstanceType
,
IntType
,
FloatType
,
StringType
,
UnicodeType
try
:
from
time
import
tzname
except
:
tzname
=
(
'UNKNOWN'
,
'UNKNOWN'
)
...
...
@@ -700,7 +700,7 @@ class DateTime:
if
arg
==
''
:
raise
self
.
SyntaxError
,
arg
if
type
(
arg
)
==
StringType
and
lower
(
arg
)
in
self
.
_tzinfo
.
_zidx
:
if
type
(
arg
)
in
[
StringType
,
UnicodeType
]
and
lower
(
arg
)
in
self
.
_tzinfo
.
_zidx
:
# Current time, to be displayed in specified timezone
t
,
tz
=
time
(),
self
.
_tzinfo
.
_zmap
[
lower
(
arg
)]
ms
=
(
t
-
math
.
floor
(
t
))
...
...
@@ -709,7 +709,7 @@ class DateTime:
x
=
_calcDependentSecond
(
tz
,
t
)
yr
,
mo
,
dy
,
hr
,
mn
,
sc
=
_calcYMDHMS
(
x
,
ms
)
elif
type
(
arg
)
==
StringType
:
elif
type
(
arg
)
in
[
StringType
,
UnicodeType
]
:
# Date/time string
if
arg
.
find
(
' '
)
==-
1
and
arg
[
4
]
==
'-'
:
...
...
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