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
1b36a91f
Commit
1b36a91f
authored
Jul 26, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged fix (fix strftime to format based on current timezone representation
of DateTime object) from 2.2 branch.
parent
8b92b99d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
lib/python/DateTime/DateTime.py
lib/python/DateTime/DateTime.py
+11
-2
No files found.
lib/python/DateTime/DateTime.py
View file @
1b36a91f
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Encapsulation of date/time values"""
__version__
=
'$Revision: 1.5
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.5
3
$'
[
11
:
-
2
]
import
sys
,
os
,
math
,
regex
,
ts_regex
,
DateTimeZone
...
...
@@ -1376,7 +1376,16 @@ class DateTime:
return
millis
def
strftime
(
self
,
format
):
return
strftime
(
format
,
gmtime
(
self
.
timeTime
()))
# Format the date/time using the *current timezone representation*.
jfirst
=
_julianday
(
self
.
_year
,
1
,
1
)
-
1
jtoday
=
_julianday
(
self
.
_year
,
self
.
_month
,
self
.
_day
)
julian
=
jtoday
-
jfirst
time_info
=
(
self
.
_year
,
self
.
_month
,
self
.
_day
,
self
.
_hour
,
self
.
_minute
,
self
.
_nearsec
,
(
self
.
_dayoffset
+
6
)
%
7
,
julian
,
0
)
return
strftime
(
format
,
time_info
)
# General formats from previous DateTime
def
Date
(
self
):
...
...
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