Title: datetime.datetime.strptime() raises an exception
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.5
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Jens de Bruijn, SilentGhost
Priority: normal Keywords:

Created on 2016-05-04 07:17 by Jens de Bruijn, last changed 2016-05-04 17:04 by brett.cannon. This issue is now closed.

File name Uploaded Description Edit
Screenshot from 2016-05-04 08-52-30.png Jens de Bruijn, 2016-05-04 07:17
Messages (2)
msg264784 - (view) Author: Jens de Bruijn (Jens de Bruijn) Date: 2016-05-04 07:17
Datetime crashes while running script from the command line. When running the same date string from the interpreter (Ubuntu 16.04) it does not crash.

date = datetime.datetime.strptime('May 01 23:59:59 +0000 2016', '%b %d %H:%M:%S +0000 %Y')
msg264841 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-05-04 16:39
Jens, the issue seems to be related to the locale under which your script is operating. You could try to ensure that the locale is suitable for the %b switch. In any case this doesn't look like a datetime bug.
Date User Action Args
2016-05-04 17:04:59brett.cannonsettitle: Datetime.strptime crash -> datetime.datetime.strptime() raises an exception
2016-05-04 16:39:57SilentGhostsetstatus: open -> closed

type: crash -> behavior

nosy: + SilentGhost
messages: + msg264841
resolution: not a bug
stage: resolved
2016-05-04 07:17:07Jens de Bruijncreate