Skip to content

Commit 36c8da5

Browse files
author
Richard Jones
committed
Changed date.Date to use regular string formatting instead of strftime.
win32 seems to have problems with %T and no hour... or something...
1 parent 1c46582 commit 36c8da5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

roundup/date.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: date.py,v 1.7 2001-08-02 00:27:04 richard Exp $
1+
# $Id: date.py,v 1.8 2001-08-05 07:46:12 richard Exp $
22

33
import time, re, calendar
44

@@ -140,8 +140,8 @@ def __cmp__(self, other):
140140

141141
def __str__(self):
142142
"""Return this date as a string in the yyyy-mm-dd.hh:mm:ss format."""
143-
return time.strftime('%Y-%m-%d.%T', (self.year, self.month, self.day,
144-
self.hour, self.minute, self.second, 0, 0, 0))
143+
return '%4d-%02d-%02d.%02d:%02d:%02d'%(self.year, self.month, self.day,
144+
self.hour, self.minute, self.second)
145145

146146
def pretty(self):
147147
''' print up the date date using a pretty format...
@@ -363,6 +363,10 @@ def test():
363363

364364
#
365365
# $Log: not supported by cvs2svn $
366+
# Revision 1.7 2001/08/02 00:27:04 richard
367+
# Extended the range of intervals that are pretty-printed before actual dates
368+
# are displayed.
369+
#
366370
# Revision 1.6 2001/07/31 09:54:18 richard
367371
# Fixed the 2.1-specific gmtime() (no arg) call in roundup.date. (Paul Wright)
368372
#

0 commit comments

Comments
 (0)