Author adamburke
Recipients adamburke
Date 2019-03-15.10:54:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The local month formatting behaviour is defined at the lowest possible level, for CPython in timemodule.c, calling into either wcsftime(), or the relevant OS-specific library.

In jython there is a reimplementation in org/python/modules/time/ which calls into the Java standard libraries, understandably enough.

The definition of %b, is "Month as locale’s abbreviated name".

One practical if slightly work-avoiding position would be to say jython locales *are* Java locales. This would be a more defensible position if jython locale stuff wasn't weak (as generally admitted), eg if setlocale() wasn't broken (also noted by Wang Yaqiang)

Traceback (most recent call last):
  File "", line 10, in <module>
    locale.setlocale(locale.LC_ALL, 'de_DE')
  File "C:\Users\Adam\jython\jython3\dist\Lib\", line 552, in setlocale
    return _setlocale(category, locale)
  File "C:\Users\Adam\jython\jython3\dist\Lib\", line 88, in setlocale
    raise Error, '_locale emulation only supports "C" locale'
ValueError: _locale emulation only supports "C" locale

OTOH, you have to fix one thing at a time, and maintaining a Java-C locale mapping sounds like a thankless and moving-target task.

As a side note for anyone fishing in this area, jython has a fork of the datetime module, which doesn't do much except override add a few __tojava__() methods. Reorganizing that in an include / override structure would be good (but not actually address this issue at all).
Date User Action Args
2019-03-15 10:54:54adamburkesetmessageid: <>
2019-03-15 10:54:54adamburkesetrecipients: + adamburke
2019-03-15 10:54:54adamburkelinkissue2730 messages
2019-03-15 10:54:53adamburkecreate