Hi all,
the following is perhaps a noob question. It this is the case, just give me the right hint, and I´m sorry.
I´d like to use a joda-time calculation/API access to get the current time for the UTC timezone, to calculate sunrise and sundown independent from summertime (daytime saving time).
So I have to get the current time in a way like this :
var check = now.withZone(DateTimeZone.UTC)
jode-time API docs state, that UTC timezone is defined as a field, so this should be correct, but designer marks it as error and the rule engine throws errors, too :
Message: Error during the execution of rule Set Sun and Dawn States
java.lang.RuntimeException: The name 'DateTimeZone' cannot be resolved to an item or type.
at org.openhab.model.script.interpreter.ScriptInterpreter.internalFeatureCallDispatch(ScriptInterpreter.java:67)
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._evaluateAbstractFeatureCall(XbaseInterpreter.java:658)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291)
Obvious and understandable, I have to import the required parts of joda-time, but I do not find any suitable jar to include within openhab files, the assumed
import org.joda.time.DateTimeZone
didn´t solve this issue.
So, my question is, how could this be done. I didn´t find any documentation with regard to joda-time together with openhab, just a pull request for updating joda to ver 2.3, so i assume it should be there and also it should be available to scripts; or is there only a subset without timezone support available within openHAB ?
Thanks for your time and your help
cheers,
Flipper