DzVentz time no leading zero's?
Posted: Tuesday 03 April 2018 23:41
Version: 3.9174
Build Hash: ac7daa5b
Compile Date: 2018-04-03 12:59:46
dzVents Version: 2.4.2
Raspberry pi 3
Hai,
Today I wrote a little script in DzVents to let me know if there was a postal delivery.
(a mercury switch on an old remote doorbell attached to the postal box)
This works nice In combination with a Domoticz off switch so I can 'reset' the ''Postal' state to 'No'.
So far so good.
Next I wanted to know when the delivery was made so I added:
local Time = require('Time')
local currentTime = Time() -- current time
currentTime = currentTime.rawTime
but when I 'display' the variable currentTime with domoticz.notify, domoticz.email or domoticz.log there are no leading zeros.
for instance:
2018-04-03 23:05:14.178 Notification: Mailbox emptied: 23:5:14 uur clearly you can see on left the logtimestamp with and the log message 23:5:14 without a leading zero.
Is there a solution ?
Regards Frank
Build Hash: ac7daa5b
Compile Date: 2018-04-03 12:59:46
dzVents Version: 2.4.2
Raspberry pi 3
Hai,
Today I wrote a little script in DzVents to let me know if there was a postal delivery.
(a mercury switch on an old remote doorbell attached to the postal box)
This works nice In combination with a Domoticz off switch so I can 'reset' the ''Postal' state to 'No'.
So far so good.
Next I wanted to know when the delivery was made so I added:
local Time = require('Time')
local currentTime = Time() -- current time
currentTime = currentTime.rawTime
but when I 'display' the variable currentTime with domoticz.notify, domoticz.email or domoticz.log there are no leading zeros.
for instance:
2018-04-03 23:05:14.178 Notification: Mailbox emptied: 23:5:14 uur clearly you can see on left the logtimestamp with and the log message 23:5:14 without a leading zero.
Is there a solution ?
Regards Frank