comparison roundup/date.py @ 1463:a11e27d80737

If no hours info is provided to Date constructors... ...it defaults to local midnight, not GMT [SF#691434] fix in history displaying of date fields changes
author Andrey Lebedev <kedder@users.sourceforge.net>
date Sun, 23 Feb 2003 19:05:15 +0000
parents 4ae9d725bec4
children 37a1906f4454
comparison
equal deleted inserted replaced
1462:285934a04a6c 1463:a11e27d80737
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: date.py,v 1.42 2003-02-07 02:33:34 richard Exp $ 18 # $Id: date.py,v 1.43 2003-02-23 19:05:14 kedder Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 Date, time and time interval handling. 21 Date, time and time interval handling.
22 """ 22 """
23 23
251 if info['m'] is not None and info['d'] is not None: 251 if info['m'] is not None and info['d'] is not None:
252 m = int(info['m']) 252 m = int(info['m'])
253 d = int(info['d']) 253 d = int(info['d'])
254 if info['y'] is not None: 254 if info['y'] is not None:
255 y = int(info['y']) 255 y = int(info['y'])
256 # time defaults to 00:00:00 now 256 # time defaults to 00:00:00 GMT - offset (local midnight)
257 H = M = S = 0 257 H = -offset
258 M = S = 0
258 259
259 # override hour, minute, second parts 260 # override hour, minute, second parts
260 if info['H'] is not None and info['M'] is not None: 261 if info['H'] is not None and info['M'] is not None:
261 H = int(info['H']) - offset 262 H = int(info['H']) - offset
262 M = int(info['M']) 263 M = int(info['M'])

Roundup Issue Tracker: http://roundup-tracker.org/