different behaiviour of manually wee_reports and automatic generation,

40 views
Skip to first unread message

Astrid

unread,
Mar 25, 2020, 10:54:33 AM3/25/20
to weewx-user
Hello!

I am using weex 3.9.2 and Standard-Skin.
German location.

If I use from commandline "wee_reports" the date is printed
in my reports on /var/www/weewx in
german notation:
25.03.2020 15:20:00
and in the weekoverview there
is standing
18,6°C um 14:45:00 (Mittwoch)

If the archive-intervall is over and
the reports in /var/www/weewx are
generated automaticially there is standing:

03/25/20 15:50:00
and
18.6°C um 14:45:00 (Wednesday)

Where can I change, that it will be
during automated generated reports
the german notation too?

Regards, Astrid



Thomas Keffer

unread,
Mar 25, 2020, 11:21:28 AM3/25/20
to weewx-user
Did you set the environment variable LANG? See the manual.

-tk

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/23627ab1-9aac-4913-80cc-75a22b71bcd9%40googlegroups.com.

Astrid

unread,
Mar 25, 2020, 12:33:31 PM3/25/20
to weewx-user
Hello!

Yes, it is set:

linux:/var/lib/weewx # echo $LANG
de_DE.UTF-8
on the computer, where weewx is running.

Has it to be set at some other places?

Regards, Astrid

Andrew Milner

unread,
Mar 25, 2020, 12:39:51 PM3/25/20
to weewx-user
did you export LANG as instructed in the customisation guide?

Astrid

unread,
Mar 25, 2020, 12:44:29 PM3/25/20
to weewx-user
P.S.:

Mär 25 17:41:57 linux systemd[1]: Started weewx weather system.
Mär 25 17:41:57 linux weewx[11116]: engine: Initializing weewx version 3.9.2
Mär 25 17:41:57 linux weewx[11116]: engine: Using Python 2.7.14 (default, Oct 12 2017, 15:50:02) [GCC]
Mär 25 17:41:57 linux weewx[11116]: engine: Platform Linux-4.12.14-lp151.28.40-default-x86_64-with-glibc2.2.5
Mär 25 17:41:57 linux weewx[11116]: engine: Locale is 'LC_CTYPE=de_DE.UTF-8;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C'


Thomas Keffer

unread,
Mar 25, 2020, 1:11:52 PM3/25/20
to weewx-user
I suspect the environment variable LANG is not being set by whatever shell is starting your daemon.

An easy fix is to go into /usr/share/weewx/user/extension.py and change this

import locale
# This will use the locale specified by the environment variable 'LANG'
# Other options are possible. See:
# http://docs.python.org/2/library/locale.html#locale.setlocale
locale.setlocale(locale.LC_ALL, '')

to this

import locale
# This will use the locale specified by the environment variable 'LANG'
# Other options are possible. See:
# http://docs.python.org/2/library/locale.html#locale.setlocale
locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')




--
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 weewx-user+...@googlegroups.com.

Astrid

unread,
Mar 25, 2020, 1:13:30 PM3/25/20
to weewx-user
Hello!

Yes, I think so.
First is set
export LANG=de_DE.UTF-8
on the linux-system, where weewx is running,
and then weewx is started.

Regards, Astrid

Astrid

unread,
Mar 26, 2020, 9:29:41 AM3/26/20
to weewx-user
:)
Thanx, now it works. :)

Regards, Astrid
Reply all
Reply to author
Forward
0 new messages