Issue of the topic:
the openhab used time is different to the system time zone.
What is wring in my configuration and where to put the right configuration?
thx
karaf consol:
date
May Fri 15 16:08:30 2020
PaperUI shows
(GMT+1:00)EUROPE/Zurich
terminal on system
date
Fri May 15 18:17:56 CEST 2020
the timezone in system is configured correctly
ls -l /etc/localtime
lrwxrwxrwx 1 root root 33 May 5 21:30 /etc/localtime -> /usr/share/zoneinfo/Europe/Zurich
The system starting via systemd
cat /etc/systemd/system/multi-user.target.wants/openhab2.service
[Unit]
Description=openHAB 2 - empowering the smart home
Documentation=https://www.openhab.org/docs/
Documentation=https://community.openhab.org
Wants=network-online.target
After=network-online.target
I am using openhab on a cubietruck with Ubuntu 16.04.
In file /etc/systemd/system/multi-user.target.wants/openhab2.service I have a line
EnvironmentFile=-/etc/default/openhab2
Settings then are defined in /etc/default/openhab2.
So there is not need to edit the existing startup script.
In your case the row with EnvironmentFile is commented out and will not be used.
What is the result if you execute this in the karaf console:
what should be the content in in /etc/default/openhab2?
why is the
export EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS1:/tmp/virtualcom0 -Duser.timezone=Europe/Zurich"
in my /openhab2.service not working?
but there is no # in front of EnvironmentFile=-/etc/default/openhab
Any clue how to fix this issue for openHAB 3?
Entering env |grep timezone in karaf console results in String user.tiezone Etc/UTC.
I’m in Europe/Berlin Timezone.
I wouldn’t go that far until the root cause is found …
In case there is no # in front of that row in the meantime it was removed resp. it may not be there because of it was not there in the file provided …
What is the content of your /etc/default/openhab file ?
What is the content of /etc/timezone ?
What timezone did you configure in the settings via main UI ( settings => regional settings ) ?
your /etc/default/openhab file just contains comments and EXTRA_JAVA_OPTS is empty
because of /etc/timezone is set to Etc/UTC your OS system runs with that timezone; Java picks it up from there as Java is not instructed to read it from /etc/default/openhab
in case you use openhabian run menu 33 to change the timezone