OH 4.3.2 using wrong time zone

@AndrewFG would need to try setting his Pi OS time zone to something other than UTC/GMT to make sure it works on non UTC time zone.

It is my operative system. So if you guys don’t mind, I would rather not try it.

Good day.

I had this problem both on RPi 4 and on x86 when using Log Viewer (only in Log Viewer the time was incorrect).

I solved it by adding EXTRA_JAVA_OPTS=“-Duser.timezone=Europe/Kyiv” to /etc/default/openhab.
In OpenHAB itself the time worked correctly.

You could clone the openHABian repo and write some test case that installs+starts openhab and shows the log. Github will do the work and clone cloud VMs on ARM hardware.

Hi,

short question as I am unsure if I understood everything.

I am on a RaspiPi 5 and updated yesterday to 4.3.2.
Now the alarm time reported by my OpenHAB App is off one hour.
The time in the log/frontail is still fine.

I am using the following code:

val long wakeupms = (Pixel8Pro_Christian_AlarmClock.state as DateTimeType).getZonedDateTime(ZoneId.of("Europe/Berlin")).toInstant.toEpochMilli

I checked the EXTRA_JAVA_OPTS and there is no timezone set.
I added the time zone ( -Duser.timezone=Europe/Berlin ) but it did not help.
EDIT: I think it did help as

now.toInstant.toEpochMilli

is now one hour off too and matches the time received from the phone again.

Is there something I can test for you?

Thanks!
Christian

So we can not change the TimeZone from:
sudo timedatectl set-timezone “Aisa/Syria”

I think you have to do both things.

This is really helpful information, thank you so much! I just finished a clean install of OH 4.3.5 on RasPi4/Bookworm/64bit and ran into this issue with the wrong time zone. The standard install image comes with Duser.timezone=Europe/London and must be adjusted to whatever is appropriate (Europe/Berlin in my case). It could be helpful to mention that in the documentation (openHABian | openHAB) as most fresh installs are affected, except for the UK folks.

I live in UK and the irony is that in my case it was wrongly showing Europe/Berlin.

No.
It’s not intended to change docs or have users manually change Linux config.
Latest installs shouldn’t be affected.

Just a sweet little revenge for brexiting. SCNR.

I love it not to change Linux settings, but in my case it was necessary. The install image was drawn on June 17th, guess that this was not latest enough


Seems many of the complainers are in the Berlin time zone..