[Python-de] strptime

Andreas Jung lists at andreas-jung.com
Fr Dez 15 19:02:49 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



- --On 15. Dezember 2006 18:59:04 +0100 "Roland M. Kruggel" 
<rk.liste at bbf7.de> wrote:

> Am Freitag, 15. Dezember 2006 18:19 schrieb Roland M. Kruggel:
>> Hallo Liste,
>>
>> ich wandele einen Datumsstring (z.b. '2006 Dez 15 15:55:22') mit
>> time.strptime(datestr, "%Y %b %d %H:%M:%S") in eine tuple um. Bis
>> zum 30. November hat das auch funktioniert. Jetzt im Dezember kennt
>> er die Abkürzung 'Dez' nicht. Es ist 'Dec' Wie sage ich es ihm
>> jetzt das der Monat in Deutsch ist und nicht in englisch?
>
>
> Funktioniert leider nicht.
> Ich bekomme folgende fehlermeldung
>
> -->
> rkruggel at sigma:~$ python
> Python 2.4.4 (#2, Oct 20 2006, 00:23:25)
> [GCC 4.1.2 20061015 (prerelease) (Debian 4.1.1-16.1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import locale
>>>> locale.setlocale(locale.LC_ALL, 'de_DE')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.4/locale.py", line 381, in setlocale
>     return _setlocale(category, locale)
> locale.Error: unsupported locale setting
> --<
>
>

<http://channel.debian.de/faq/ch-bugs.html>


- -> 8.1

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFguNQCJIWIbr9KYwRAhemAKDC7KSpvdpHQDWJCp2p5d8Dj73MNwCeIBka
td2onZYnCF+0chdJszICNrw=
=EYEc
-----END PGP SIGNATURE-----





Mehr Informationen über die Mailingliste python-de