Wrong timezone in rules

35 views
Skip to first unread message

Anton Menshutin

unread,
Sep 14, 2015, 8:40:05 AM9/14/15
to openhab
I have implemented a rule that turns light on when it is sunset and time is less then 23pm. or when it is sunrise and time is 6 a.m.
I use astro binding to calculate sun position and now.getHour for current time.
It seems that timezone used by rules engine is wrong.

If I print the result of now.getHour to a log file I got the following
2015-09-14 15:20:00.096 [INFO ] [org.openhab.model.script.Sun  ] - hour=16 Sun Position Sun_Position (Type=NumberItem, State=26.88)
So current time is one hour forward.

I guess it is related to joda time library version, since in Russia timezone was changed a year ago. I found the following file joda-time-2.3.jar somewhere in the openhab installation.
Current version of jodatime is 2.8.

Is it possible to update joda-time library for a newer version?

Reply all
Reply to author
Forward
0 new messages