Mercurial > p > roundup > code
changeset 1337:95ef1dcbb3be
always default time to 00:00:00
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 16 Dec 2002 04:39:36 +0000 |
| parents | 6a54b51b1784 |
| children | 82ff15307f92 |
| files | CHANGES.txt doc/index.txt roundup/date.py |
| diffstat | 3 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Sun Dec 15 23:55:34 2002 +0000 +++ b/CHANGES.txt Mon Dec 16 04:39:36 2002 +0000 @@ -5,6 +5,7 @@ - key the templates cache off full path, not filename - implemented whole-database locking - hyperlinking of special text (url, email, item designator) in messages +- fixed time default in date.py 2002-12-11 0.5.3
--- a/doc/index.txt Sun Dec 15 23:55:34 2002 +0000 +++ b/doc/index.txt Mon Dec 16 04:39:36 2002 +0000 @@ -77,6 +77,7 @@ Patrick Ohly, Will Partain, Bernhard Reiter, +John P. Rouillard, Dougal Scott, Stefan Seefeld, Jeffrey P Shell,
--- a/roundup/date.py Sun Dec 15 23:55:34 2002 +0000 +++ b/roundup/date.py Mon Dec 16 04:39:36 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: date.py,v 1.37 2002-12-09 02:43:21 richard Exp $ +# $Id: date.py,v 1.38 2002-12-16 04:39:36 richard Exp $ __doc__ = """ Date, time and time interval handling. @@ -244,15 +244,18 @@ info = m.groupdict() - # get the current date/time using the offset - y,m,d,H,M,S,x,x,x = time.gmtime(time.time()) + # get the current date as our default + y,m,d = time.gmtime(time.time())[:3] + + # time defaults to 00:00:00 _always_ + H = M = S = 0 # override year, month, day parts if info['m'] is not None and info['d'] is not None: m = int(info['m']) d = int(info['d']) - if info['y'] is not None: y = int(info['y']) - H = M = S = 0 + if info['y'] is not None: + y = int(info['y']) # override hour, minute, second parts if info['H'] is not None and info['M'] is not None:
