Dear comunity,
I try to convert an epoche number from zigbee2mqtt epoche to datetime to display the date properly. I use mainly this page: DateTime Conversion
When I receive the Number Item for the epoche with Milliseconds (13 digits) the following rule outputs different numbers.
Rule:
logInfo("Zigbee Devices","Aktualisierung DateTime Lastseen, Epoche aus Item: " + Aqara_Balkon_Lastseen_epoche.state.toString)
val int epoche_Millis = (Aqara_Balkon_Lastseen_epoche.state as Number).intValue
logInfo("Zigbee Devices","Aktualisierung DateTime Lastseen, Epoche Millis: " + epoche_Millis.toString)
But the log shows two different numbers:
2020-02-27 18:50:45.267 [INFO ] [marthome.model.script.Zigbee Devices] - Aktualisierung DateTime Lastseen, Epoche aus Item: 1582825530384
2020-02-27 18:50:45.270 [INFO ] [marthome.model.script.Zigbee Devices] - Aktualisierung DateTime Lastseen, Epoche Millis: -2017401840
Probably some easy error but 60 min + google do not help me somehow
Happy for the right hint - thanks!
Best
MatzeMuc86