2014-08-24 17:40:24 +01:00
|
|
|
Testing 2000
|
|
|
|
Testing 2001
|
|
|
|
Testing 2002
|
|
|
|
Testing 2003
|
|
|
|
Testing 2004
|
|
|
|
Testing 2005
|
|
|
|
Testing 2006
|
|
|
|
Testing 2007
|
|
|
|
Testing 2008
|
|
|
|
Testing 2009
|
|
|
|
Testing 2010
|
|
|
|
Testing 2011
|
|
|
|
Testing 2012
|
|
|
|
Testing 2013
|
|
|
|
Testing 2014
|
|
|
|
Testing 2015
|
|
|
|
Testing 2016
|
|
|
|
Testing 2017
|
|
|
|
Testing 2018
|
|
|
|
Testing 2019
|
|
|
|
Testing 2020
|
|
|
|
Testing 2021
|
|
|
|
Testing 2022
|
|
|
|
Testing 2023
|
|
|
|
Testing 2024
|
|
|
|
Testing 2025
|
|
|
|
Testing 2026
|
|
|
|
Testing 2027
|
|
|
|
Testing 2028
|
|
|
|
Testing 2029
|
|
|
|
Testing 2030
|
|
|
|
Testing 2031
|
|
|
|
Testing 2032
|
|
|
|
Testing 2033
|
lib: Fix some issues in timeutils
In particular, dates prior to Mar 1, 2000 are screwed up.
The easiest way to see this is to do:
>>> import time
>>> time.localtime(0)
(2000, 1, 1, 0, 0, 0, 5, 1)
>>> time.localtime(1)
(2000, 1, 2, 233, 197, 197, 6, 2)
With this patch, we instead get:
>>> import time
>>> time.localtime(1)
(2000, 1, 1, 0, 0, 1, 5, 1)
Doh - In C % is NOT a modulo operator, it's a remainder operator.
2015-05-18 16:26:58 +01:00
|
|
|
time.localtime( 0 ) returned (2000, 1, 1, 0, 0, 0, 5, 1) (pass)
|
|
|
|
time.localtime( 1 ) returned (2000, 1, 1, 0, 0, 1, 5, 1) (pass)
|
|
|
|
time.localtime( 59 ) returned (2000, 1, 1, 0, 0, 59, 5, 1) (pass)
|
|
|
|
time.localtime( 60 ) returned (2000, 1, 1, 0, 1, 0, 5, 1) (pass)
|
|
|
|
time.localtime( 3599 ) returned (2000, 1, 1, 0, 59, 59, 5, 1) (pass)
|
|
|
|
time.localtime( 3600 ) returned (2000, 1, 1, 1, 0, 0, 5, 1) (pass)
|
|
|
|
time.localtime( -1 ) returned (1999, 12, 31, 23, 59, 59, 4, 365) (pass)
|
|
|
|
time.localtime( 447549467 ) returned (2014, 3, 7, 23, 17, 47, 4, 66) (pass)
|
|
|
|
time.localtime( -940984933 ) returned (1970, 3, 7, 23, 17, 47, 5, 66) (pass)
|
|
|
|
time.localtime( -1072915199 ) returned (1966, 1, 1, 0, 0, 1, 5, 1) (pass)
|
|
|
|
time.localtime( -1072915200 ) returned (1966, 1, 1, 0, 0, 0, 5, 1) (pass)
|
|
|
|
time.localtime( -1072915201 ) returned (1965, 12, 31, 23, 59, 59, 4, 365) (pass)
|