Message6678

Author amak
Recipients alexeyts, amak
Date 2011-10-15.11:34:35
SpamBayes Score 2.2389337e-09
Marked as misclassified No
Message-id <1318678475.98.0.159826929286.issue1800@psf.upfronthosting.co.za>
In-reply-to
Content
Works for me.

>C:\jython252\jython.bat
Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.5.0_21
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> print datetime.strptime('1/4/2011 02:00:00', '%d/%m/%Y %H:%M:%S')
2011-04-01 02:00:00

This is almost certainly a timezone issue, relating to daylight saving time. I'd be surprised if it happens only for this specific time.

What is the timezone setting for the machine on which you're running the code? What happens if you include a timezone in the time string?
History
Date User Action Args
2011-10-15 11:34:35amaksetmessageid: <1318678475.98.0.159826929286.issue1800@psf.upfronthosting.co.za>
2011-10-15 11:34:35amaksetrecipients: + amak, alexeyts
2011-10-15 11:34:35amaklinkissue1800 messages
2011-10-15 11:34:35amakcreate