Skip to content

Commit 63b2fc8

Browse files
author
Richard Jones
committed
prevent generation of new single-digit seconds dates [SF#1429390]
1 parent c76b0d0 commit 63b2fc8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Fixed:
2121
- umask is now configurable (with the same 0002 default)
2222
- sorting of entries in classhelp popup (sf bug 1449000)
2323
- allow single digit seconds in date spec (sf bug 1447141)
24-
24+
- prevent generation of new single-digit seconds dates (sf bug 1429390)
2525

2626
2006-03-03 1.1.1
2727
Fixed:

roundup/backends/rdbms_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: rdbms_common.py,v 1.169 2006-04-27 01:39:47 richard Exp $
18+
#$Id: rdbms_common.py,v 1.170 2006-04-27 05:15:17 richard Exp $
1919
''' Relational database (SQL) backend common code.
2020
2121
Basics:
@@ -720,7 +720,7 @@ def clear(self):
720720
hyperdb_to_sql_value = {
721721
hyperdb.String : str,
722722
# fractional seconds by default
723-
hyperdb.Date : lambda x: x.formal(sep=' ', sec='%.3f'),
723+
hyperdb.Date : lambda x: x.formal(sep=' ', sec='%06.3f'),
724724
hyperdb.Link : int,
725725
hyperdb.Interval : str,
726726
hyperdb.Password : str,

roundup/date.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: date.py,v 1.85 2006-04-27 05:11:28 richard Exp $
18+
# $Id: date.py,v 1.86 2006-04-27 05:15:16 richard Exp $
1919

2020
"""Date, time and time interval handling.
2121
"""
@@ -391,7 +391,7 @@ def pretty(self, format='%d %B %Y'):
391391
return str
392392

393393
def __repr__(self):
394-
return '<Date %s>'%self.formal(sec='%f')
394+
return '<Date %s>'%self.formal(sec='%06.3f')
395395

396396
def local(self, offset):
397397
""" Return this date as yyyy-mm-dd.hh:mm:ss in a local time zone.
@@ -408,7 +408,7 @@ def get_tuple(self):
408408
self.second, 0, 0, 0)
409409

410410
def serialise(self):
411-
return '%4d%02d%02d%02d%02d%f'%(self.year, self.month,
411+
return '%4d%02d%02d%02d%02d%06.3f'%(self.year, self.month,
412412
self.day, self.hour, self.minute, self.second)
413413

414414
def timestamp(self):

0 commit comments

Comments
 (0)