blockly timedifference function

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
laggmunk
Posts: 12
Joined: Sunday 14 July 2013 16:49
Target OS: -
Domoticz version:
Contact:

blockly timedifference function

Post by laggmunk »

today I use the following function in LUA:

function timedifference (s)
year = string.sub(s, 1, 4)
month = string.sub(s, 6, 7)
day = string.sub(s, 9, 10)
hour = string.sub(s, 12, 13)
minutes = string.sub(s, 15, 16)
seconds = string.sub(s, 18, 19)
t1 = os.time()
t2 = os.time{year=year, month=month, day=day, hour=hour, min=minutes, sec=seconds}
difference = os.difftime (t1, t2)
return difference
end

would it be possible to have the same functionality in blockly? that way one can create blockly to trigger events when a certain condition has been in effect for a certain amount of time.
User avatar
gizmocuz
Posts: 2486
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: blockly timedifference function

Post by gizmocuz »

you will have to make a git pull request for this
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest