Message8600
1) Day/month with 00 value is accepted:
Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:48:36)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_55
Type "help", "copyright", "credits" or "license" for more information.
>>> import time, datetime
>>> time.strptime('0000-00-00 00:00:00', '%Y-%m-%d %H:%M:%S')
(2, 11, 30, 0, 0, 0, 6, 334, -1)
>>> datetime.datetime.strptime('0000-00-00 00:00:00', '%Y-%m-%d %H:%M:%S')
datetime.datetime(2, 11, 30, 0, 0)
With CPython both of the above yield this error:
ValueError: time data '0000-00-00 00:00:00' does not match format '%Y-%m-%d %H:%M:%S'
2) String not matching pattern is accepted:
>>> time.strptime('11:59 02-06-2014', '%H:%M %d-%m')
(1970, 6, 2, 11, 59, 0, 1, 153, -1)
>>> datetime.datetime.strptime('11:59 02-06-2014', '%H:%M %d-%m')
datetime.datetime(1970, 6, 2, 11, 59)
With CPython you get:
ValueError: unconverted data remains: -2014 |
|
Date |
User |
Action |
Args |
2014-06-07 22:38:36 | pekka.klarck | set | recipients:
+ pekka.klarck |
2014-06-07 22:38:36 | pekka.klarck | set | messageid: <1402180716.48.0.699727603925.issue2162@psf.upfronthosting.co.za> |
2014-06-07 22:38:36 | pekka.klarck | link | issue2162 messages |
2014-06-07 22:38:35 | pekka.klarck | create | |
|