OpenWeatherMap showing sunset and sunrise times +1 hr

New Install Openhasbian, Pi 4.

I am using OpenWeatherMap to display local weather, including sunrise and sunset times.

However they are displaying the time +1 Hr.

In the event log the time is correct:
2022-11-20 01:59:53.251 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘LocalWeatherandForecastOneCallAPI_Current_Sunset’ changed from 2022-11-19T16:08:04.000+0000 to 2022-11-20T16:06:53.000+0000

The time displayed in the channel is also out by +1Hr

The local and OS date are set correctly.

Where is it picking up the extra hour?

Check the location on the OpenWatherMap account Thing and make sure it’s in the right timezone. Check the timezone setting of your machine and Java that is running OH. There are lots of threads on that here on the forum.

Do you notice time differences elsewhere, such as the timestamps on logs and the like?

I think the eventlog is out by one hour.

This event is logged at 17:08 instead of 16:08

2022-11-20 17:08:00.003 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:civilDusk#event triggered START

I have set the local in openhabian-config and the linux date local to UK GMT

openhabian@openhabian:~ $ date

Sun 20 Nov 2022 07:07:44 PM GMT

So not sure what I am missing.


Java itself can have it’s own timezone setting . I’ve never had to change this myself but I’m certain there are lots of tutorials for “hoe to change Java timezone”.

I added EXTRA_JAVA_OPTS = “-Duser.timezone=Europe/London” in /etc/default/openHAB


That seemed to do the trick.


I don’t recall doing this in previous installations.


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.