Last week I upgraded openHAB to 4.2.1. I then started with a clean openHABian 1.9 (64 bit from the Raspberry Pi Etcher) to move to the new version. Since I did this, openHAB is using UTC time instead of local time. My dear wife asked me why the outside lights turned on at 2 AM local time and didn’t turn on in the evening, which caused me to look into it.
The entries in the events and openhab logs are time stamped with UTC times. The Astro binding is using these times, which has messed up my triggers.
I’m running on a Pi 4B. Here is the Technical Information from openHAB
On the Pi, timedatectl show the correct local time:
openhabian@oh-m:~ $ timedatectl
Local time: Sun 2024-09-08 21:15:21 MDT
Universal time: Mon 2024-09-09 03:15:21 UTC
RTC time: n/a
Time zone: America/Denver (MDT, -0600)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
openhabian@oh-m:~ $
The settings in the openHAB UI, Settings, Regional Settings shows Local Time Zone as GMT-7, which is correct.
I tried rebooting the Pi, but it didn’t change anything.
openHABian-config System Setting 33 displays the correct local time.
That’s the right hint but bad advice as-is because you would overwrite all the required java opts.
Check the options java process is running with first. It should already have the string.
If not, there should already be a line for that variable. Append the string there.
openhabian@oh-m:/boot $ free -m
total used free shared buff/cache available
Mem: 3841 1963 598 2 1357 1878
Swap: 3071 0 3071
Is it better to limit the memory used to the free RAM memory, or is it OK for it to spill over into the Swap memory?
I’m guessing that this means there is enough inactive memory that could be swapped without adversely impacting performance to go to the higher levels you recommended.
I did, and I bricked it. It is a headless unit and I don’t have a keyboard handy, so I don’t think I can edit it back to what it was. I do have the OH 4.2.1 SD card with the previous version of openhabian, so it won’t be much work to create a new one.
@mstormi would it be possible to add a menu option to change the Java timezone?
Another (better) fix would be to adjust the Astro (and other bindings) not to use the system time zone but respect the openHAB setting. I can look into that.
I have had this issue ever since moving to 1.9. Even if you set the timezone in openhabian.conf on the SD before first boot it ignores it. It always goes to London. Same for password. It will grab the locale if you set it.
I always check and edit the following files after a build.
They’re the openHABian defaults, and in fact they are what they are for good reasons.
-Xms pre-allocates memory to speed up stuff, but that’s an only minor benefit to be traded off against the effects of increasing it. Doing so will result in more paging hence SD deterioration.
-Xmx is just a hard limit and does not affect paging.
If -Xmx had been too low, java would have crashed when this had been reached.
Since you did not report anything I guess it wasn’t, and there’s also no reports of Java crashing elsewhere because of this although about any openHABian user is using them.