]> git.tokkee.org Git - roundup.git/commitdiff

Code

If no hours info is provided to Date constructors it defaults to local midnight,...
authorkedder <kedder@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sun, 23 Feb 2003 19:05:15 +0000 (19:05 +0000)
committerkedder <kedder@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sun, 23 Feb 2003 19:05:15 +0000 (19:05 +0000)
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
roundup/date.py

index c2ec5d08cdc01a482c59b6e40b24c9f9fca74016..3e174c1fdde2a5abe921a0cedacbf66f6d54a410 100644 (file)
@@ -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)
 
index fb4574f0a9fdd3af70fcd2107a52c47422a876b8..a5bb8a922796567b9572c9d939aaf9032cc5085d 100644 (file)
@@ -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: