You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dzVents v3.1.8 toUTC() function returns a string not domoticz time object as indicated in the Documentation page"DzVents: next generation Lua scripting"
toUTC(string | table,[offset]): domoticz time object. 3.0.9 returns domoticz time object based on first parameter (time as table or string) string format must be ‘yyyy-mm-dd hh:mm:ss’. offset defaults to 0.
function self.toUTC(oDate, offset)
local sDate = ( type(oDate) == 'table' and os.date("%Y-%m-%d %H:%M:%S", os.time(oDate)) ) or oDate
local offset = offset or 0
return Time(sDate).addSeconds(-1 * getTimezone() + offset).raw
The text was updated successfully, but these errors were encountered:
Test: domoticz.log ('Type of toUTC(Time()) : ' .. type(domoticz.time.toUTC(Time())) )
Result: Type of toUTC(Time()) : string
It doesn't really matter just that the documentation doesn't match the function. Probably best to leave the function as is (not to make a breaking change) and update the documentation instead.
dzVents v3.1.8 toUTC() function returns a string not domoticz time object as indicated in the Documentation page"DzVents: next generation Lua scripting"
toUTC(string | table,[offset]): domoticz time object. 3.0.9 returns domoticz time object based on first parameter (time as table or string) string format must be ‘yyyy-mm-dd hh:mm:ss’. offset defaults to 0.
The text was updated successfully, but these errors were encountered: