I mentioned if I use “now” inside my rules it seems to be UTC always, not considering my timezone or daylight saving time. Same thing if I use charts the time is also UTC.
My workaround currently is to hard-code time difference and use a switch to set or unset daylight saving time. This is a bit awkward.
Does openHAB offer anything to consider timezone and daylight saving time automatically?
Currently I am using openHAB version 1.6.2.
As I am new to openHAB I think this is a beginner issue. So thanks in advance.
Thanks for the answers. I already checked my system time to be correct.
date-command results in “Mi 28. Okt 19:19:15 CET 2015”.
This is correct for me here in Germany.
Is there any difference between the system time and default time zone that joda-time refers to?
I mentioned in joda time documentation that now can take timezone as argument as well. Will try this next.
Took some time today to investigate the issue and traced down the root cause:
My System time was set correct (thanks Rich for your hint)
Also joda time “now” was referring to the correct time for my timezone (thanks Kai for the info)
Problem was that I auto-start openHAB from “rc.local”. It seems that sytem time initialization is not complete and “now” gives UTC. If I start openHAB from system prompt then “now” uses correct time-zone.