Try this:
import locale, time
locale.setlocale(locale.LC_ALL,'')
print(time.strftime("%b"))
print(time.strftime("%B"))
Under German locale (LANG=de_DE.utf-8), I get
Mär
März
-tk
On Tue, Mar 12, 2019 at 9:13 AM Copain <[email protected]> wrote:
> Thanks, Thomas for your format details.
>
> I will do some more testing. Maybe I can find out, why month 'Mar'
> suddenly looses its middle 'a'.
>
> Certainly, there is also the influence from the locale. Fortunately, March
> is the ony month affected in German.
>
>
>
> Am Montag, 11. März 2019 17:15:21 UTC+1 schrieb Copain:
>
>> I am running weewx on RPi 3B with dietpi and German locale.
>>
>> In NOAA reports I noticed some strange formats for
>> - temperature (°C) and
>> - months ('Mär' for 'Mar')
>>
>> Some variables affected are '$unit.label.outTemp.strip()',
>> '$year.outTemp.maxtime.format($M,$NODAY)',
>> '$year.outTemp.mintime.format($M,$NODAY)',
>> '$year.rain.maxsumtime.format($M,$NODAY)' and
>> '$year.wind.maxtime.format($M,$NODAY)'.
>>
>> Where / how could those be changed in oder to show propper formatting?
>>
>> Thanks.
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.