Comment 3 for bug 697833

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Vadim,

Thanks, Yes en_GB locale has time format as %T so now it will take it as %T.

Try this on your localhost on python prompt

import locale
>>> locale.setlocale(locale.LC_ALL,'en_GB.utf8')
'en_GB.utf8'

>>> locale.nl_langinfo(locale.T_FMT)
'%T'

>>> locale.nl_langinfo(locale.D_FMT)
'%d/%m/%y'

but what python2.6 is raising valueError:

>>> dt = '06/01/2011 06'
>>> from datetime import datetime
>>> datetime.strptime(dt,'%d/%m/%y %T')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/_strptime.py", line 317, in _strptime
    (bad_directive, format))
ValueError: 'T' is a bad directive in format '%d/%m/%y %T'

Thanks,