Twilio Flow the widget looks like Liquid variables %H

172 views Asked by At

I am trying to get the current hour of the day using date: "%H" in a set variables widget. I do the this first on day of month (date: "%d") which works okay, but the hour doesn't appear to return any value, any suggestions?

Basically, trying to compensate for the time difference in UK and US, using 'now'.

image loaded here.

1

There are 1 answers

6
philnash On

From your screenshot I can see one use of %H in which you set a time_zone variable to {{ 'now' | date: " %H %M " }}. I can then see you are comparing that time_zone variable as a time.

When you compare as a time in Studio you need to provide the time in the form "HH:MM", but it seems you have it in the format " HH MM ".

Try setting the variable to be {{ 'now' | date: "%H:%M" }} and see if things work.