I'm using the version 2024.4 on raspberry pi. I admit it's an old version now, but so far it was working.
I had a script using the Time functions properly working for several years already and now I face weird behavior on handling the time.
I wonder if something happened on my domoticz because I now receive weird behavior on functions using Time. I made a test on this simple DZvent script:
Code: Select all
return {
on = {
timer = {
'every minute' -- causes the script to be called every minute
}
},
logging = {
level = domoticz.LOG_INFO,
marker = 'template',
},
execute = function(domoticz, timer)
domoticz.log('Timer event was triggered by my testscript' .. timer.trigger, domoticz.LOG_INFO)
local Time = require('Time')
local now = Time() -- current time
domoticz.log("test usage Time: now="..now.getISO())
domoticz.log("test usage Time: deltatemps="..now.dateToTimestamp('2026-10-12 12:45:00','yyyy-mm-dd hh:MM:ss'))
end
}I'd expect that the log shows increasing number of seconds, and approx hundreds to thousands seconds but no more.
Now my log shows:
2026-10-12 12:56:00.332 Status: dzVents: Info: template: ------ Start internal script: Test usage Time():, trigger: "every minute"
2026-10-12 12:56:00.332 Status: dzVents: Info: template: Timer event was triggered by my testscriptevery minute
2026-10-12 12:56:00.332 Status: dzVents: Info: template: test usage Time: now=2026-10-12T10:56:00Z
2026-10-12 12:56:00.332 Status: dzVents: Info: template: test usage Time: deltatemps=1791801900
2026-10-12 12:56:00.332 Status: dzVents: Info: template: ------ Finished Test usage Time()
and next update shows:
2026-10-12 12:57:00.299 Status: dzVents: Info: template: ------ Start internal script: Test usage Time():, trigger: "every minute"
2026-10-12 12:57:00.299 Status: dzVents: Info: template: Timer event was triggered by my testscriptevery minute
2026-10-12 12:57:00.300 Status: dzVents: Info: template: test usage Time: now=2026-10-12T10:57:00Z
2026-10-12 12:57:00.300 Status: dzVents: Info: template: test usage Time: deltatemps=1791801900
2026-10-12 12:57:00.300 Status: dzVents: Info: template: ------ Finished Test usage Time()
As you can see, the value of "now" is evolving, but the value of dateToTimeStamp remains equal to 1791801900.. and that value is clearly skyhigh to what I understand it should be (12:45 to 12:56 should be 11 minutes*60s=660 seconds.. and 720s at 12:57.
Am I misunderstanding something ?
br,
Rico