I'm trying to parse a string to a date object on Google App Engine. The string is formatted locally and I thereby either need to set the locale setting before parsing the string or find a third part module that does international formatting. In Google App Engine I found that only the "C" locale is supported, which made my initial implementation useless:
datestring = "20. oktober 2013, 18:43"
locale.setlocale(locale.LC_ALL, 'da_DK.UTF-8')
date = datetime.datetime.strptime(datestring, "%d. %B %Y, %H:%M")
Threw error:
Error: locale emulation only supports "C" locale
In my search for a third part module I found Babel. It has formatting features from data objects to string but I can't see that it works the other way around, and I can't find another module that does the trick.
Is there any other solution I haven't thought of, or do I need to go make my own module for this?
Thanks!