time await not working

65 views
Skip to first unread message

Guy Forssman

unread,
Jul 13, 2021, 4:52:29 PM7/13/21
to Automate
Hi there,

It seems that I can't get the Time Await to work.

Flow Start
Time Await = time  doesn't seem to work. (error variable time unkbown)

Then I introduced a set variable block  where I declared time = now

Once i've declared this time variable. The error in the following Time Await block disappears.

You can even delete the whole set variable block, time variable seems to exist know.
but helas time awaits keep waiting

I declared the time10 = now +10 variable and put it in the Time Await block like this.
=dateParts(time)[3] ++ ":" ++ dateParts(time)[4] ++ ":" ++ (dateParts(time)[5] + 10) and numerous variations. Tme await keep waiting

Also older calender flows in the community seem to have a ever waiting Time Await problem.

What am I missing here?
Best regards,
Guy


Guy Forssman

unread,
Jul 14, 2021, 3:31:17 AM7/14/21
to Automate
I also tried dateFormat(time10, "k:mm") I can only lieral put an hour in it like 09:32 that works but no variable
Message has been deleted
Message has been deleted

Bushmills

unread,
Jul 14, 2021, 8:40:26 AM7/14/21
to Automate
Now returns epoch, relative to UTC. "Await time" defaults to your local time zone.  If they differ, Now may not reflect the time you expected..
Try to set UTC as "Await time" time zone.
Also, Now doesn't represent seconds since midnight, as expected by Await time.  In order to convert the number of seconds, as delivered by Now to seconds since midnight (UTC), take modulo number_of_seconds_per_day,  that is,   Now % 86400.

A third, but probably unneeded measure, would be to strip the decimal part from Now, as I'm not sure that "Await time" behaves nicely with reals. So instead of "Now", you may want to use    floor (Now % 86400)   - and don't forget about the UTC setting in "Await time".

Guy Forssman

unread,
Jul 14, 2021, 1:51:38 PM7/14/21
to Automate
Thank you dat worked indeed. 
Reply all
Reply to author
Forward
0 new messages