I’m struggling with converting Unix timestamp (e.g. “1422616466”) into DateTime.
UX Timestamp I receive from OwnTracks and following rule handles it:
I’ve added following code to handle timestamp information:
var String tst = transform(“JSONPATH”, “$.tst”, json)
var DateTime time = new DateTime((tst as Long) * 1000L)
The error message:
[ERROR] [o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule ‘MqttPostionParse’: Cannot cast java.lang.String to java.lang.Long
Thank you very much for your help