Sunrise / sunset trigger event one hour than real sunset

Hi,
I’ve created such Thing:

astro:sun:SunRiseSetHome  [ geolocation=" 54.372158, 18.638306,50" ] {
    Channels:
        Type start : rise#start [
            offset=5
        ]
        Type end : set#start [
            offset=0
        ]
}

and event is triggered one hour earlier than real sunset.
When I check my time setting I’ve got:

openhabian@openhabian:/var/log/openhab $ timedatectl
               Local time: Thu 2024-10-24 23:20:33 CEST
           Universal time: Thu 2024-10-24 21:20:33 UTC
                 RTC time: n/a
                Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

What is ok. But sunset for today should be 17:25 but trigger event 16:25 but in logs I have info:
2024-10-24 15:25:00.005 [INFO ] [org.openhab.core.model.script.FILE ] - External_light_logic_on: Switch on External light

When I display log and current date I have following situatiion:

openhabian@openhabian:/var/log/openhab $ tail -5 openhab.log
2024-10-24 22:51:24.291 [INFO ] [org.openhab.core.model.script.FILE  ] - Intr_alarm_mgt: Is belong to  gPerimiterSensors val[false]
2024-10-24 22:51:24.292 [INFO ] [org.openhab.core.model.script.FILE  ] - Intr_alarm_mgt: Initial alarmStatus val[DEACTIVATED]
2024-10-24 22:51:24.294 [INFO ] [org.openhab.core.model.script.FILE  ] - Intr_alarm_mgt: alarmMode val[OFF]
2024-10-24 22:51:24.295 [INFO ] [org.openhab.core.model.script.FILE  ] - Intr_alarm_mgt: IntruderAlarm_Mode_Switch val[OFF]
2024-10-24 22:51:24.296 [INFO ] [org.openhab.core.model.script.FILE  ] - Intr_alarm_mgt: =================== END  =============
openhabian@openhabian:/var/log/openhab $ date
Thu Oct 24 11:51:30 PM CEST 2024

What is also strange… difference between openhab log and local time is 1h, openhab is not CEST neither UCT :frowning:
What is wrong with my settings?

Have you looked in the forum?

But what is a solution?
I’ve checked and I have:

EXTRA_JAVA_OPTS=“-Xms192m -Xmx768m -XX:-TieredCompilation -XX:+ExitOnOutOfMemoryError -Dxtext.qn.interning=true -Duser.timezone=Europe/Berlin”

in /etc/defualt/openhab, and it is look ok.

Do you have your settings set in the UI under settings regional settings?
Also there is a time zone setting there as well as country.

I have following values:

Maybe there is a problem with daylight saving time, but I do not see setting related with DST

Have you tried restarting Openhab and see if the log times change?

Could even be this:

There is no /etc/timezone file in my Openhabian installation.

Ok, I’ve restarted Openhabian and now at least in log dates are the same as when I execute ‘date’. Maybe it has solved a problem. We will see tomorrow :slight_smile:

I would have just restarted Openhab and see if the log files synced and if not then reboot the server. That way you would know which is causing the issue.
Anyway hopefully it will work now.

Did it work?

It seems now it works fine, but to be honest I do not know what helped :slight_smile: For sure restart was needed :slight_smile:

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