From 59a82c2780ee1c84d56debcb3de9ec8f1954db35 Mon Sep 17 00:00:00 2001 From: kedder Date: Sun, 23 Feb 2003 19:05:15 +0000 Subject: [PATCH] If no hours info is provided to Date constructors it defaults to local midnight, not GMT (sf bug 691434) fix in history displaying of date fields changes git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1540 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/cgi/templating.py | 2 -- roundup/date.py | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index c2ec5d0..3e174c1 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -661,8 +661,6 @@ class HTMLItem(HTMLPermissions): d = date.Date(args[k]).local(timezone) cell.append('%s: %s'%(k, str(d))) if current.has_key(k): - if not current[k] == '(no value)' and current[k]: - current[k] = date.Date(current[k]).local(timezone) cell[-1] += ' -> %s' % current[k] current[k] = str(d) diff --git a/roundup/date.py b/roundup/date.py index fb4574f..a5bb8a9 100644 --- a/roundup/date.py +++ b/roundup/date.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: date.py,v 1.42 2003-02-07 02:33:34 richard Exp $ +# $Id: date.py,v 1.43 2003-02-23 19:05:14 kedder Exp $ __doc__ = """ Date, time and time interval handling. @@ -253,8 +253,9 @@ class Date: d = int(info['d']) if info['y'] is not None: y = int(info['y']) - # time defaults to 00:00:00 now - H = M = S = 0 + # time defaults to 00:00:00 GMT - offset (local midnight) + H = -offset + M = S = 0 # override hour, minute, second parts if info['H'] is not None and info['M'] is not None: -- 2.39.5