Here's the problem:
-----xxxxx----- In [23]: locale.getlocale() Out[23]: ('en_IN', 'ISO8859-1')
In [24]: util.parsetime(data[0]['created_at']) --------------------------------------------------------------------------- Error Traceback (most recent call last)
/usr/lib/python2.6/dist-packages/gwibber/microblog/<ipython console> in <module>()
/usr/lib/python2.6/dist-packages/gwibber/microblog/util/__init__.pyc in parsetime(t) 10 locale.setlocale(locale.LC_TIME, 'C') 11 result = mx.DateTime.Parser.DateTimeFromString(t) ---> 12 locale.setlocale(locale.LC_TIME, loc) 13 return result.ticks() 14
/usr/lib/python2.6/locale.pyc in setlocale(category, locale) 511 # convert to string
512 locale = normalize(_build_localename(locale)) --> 513 return _setlocale(category, locale) 514 515 def resetlocale(category=LC_ALL):
Error: unsupported locale setting
-----xxxxx-----
And it works if locale is en_US.utf8
In [25]: locale.setlocale(locale.LC_ALL,'en_US.utf8') Out[25]: 'en_US.utf8'
In [26]: util.parsetime(data[0]['created_at']) Out[26]: 1276948509.0 -----xxxxx-----
Here's the problem:
-----xxxxx-----
In [23]: locale.getlocale()
Out[23]: ('en_IN', 'ISO8859-1')
In [24]: util.parsetime( data[0] ['created_ at']) ------- ------- ------- ------- ------- ------- ------- ------- ------- -----
-------
Error Traceback (most recent call last)
/usr/lib/ python2. 6/dist- packages/ gwibber/ microblog/ <ipython console> in <module>()
/usr/lib/ python2. 6/dist- packages/ gwibber/ microblog/ util/__ init__. pyc in parsetime(t) setlocale( locale. LC_TIME, 'C') Parser. DateTimeFromStr ing(t) setlocale( locale. LC_TIME, loc)
10 locale.
11 result = mx.DateTime.
---> 12 locale.
13 return result.ticks()
14
/usr/lib/ python2. 6/locale. pyc in setlocale(category, locale)
511 # convert to string
512 locale = normalize( _build_ localename( locale) ) category, locale) category= LC_ALL) :
--> 513 return _setlocale(
514
515 def resetlocale(
Error: unsupported locale setting
-----xxxxx-----
And it works if locale is en_US.utf8
-----xxxxx-----
In [25]: locale. setlocale( locale. LC_ALL, 'en_US. utf8')
Out[25]: 'en_US.utf8'
In [26]: util.parsetime( data[0] ['created_ at'])
Out[26]: 1276948509.0
-----xxxxx-----