简体   繁体   English

Twilio Flow 小部件看起来像 Liquid 变量 %H

[英]Twilio Flow the widget looks like Liquid variables %H

I am trying to get the current hour of the day using date: "%H" in a set variables widget.我正在尝试在设置变量小部件中使用 date: "%H" 获取当前时间。 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?我在每月的某一天(日期:“%d”)首先执行此操作,这可以正常工作,但小时似乎没有返回任何值,有什么建议吗?

Basically, trying to compensate for the time difference in UK and US, using 'now'.基本上,尝试使用“现在”来补偿英国和美国的时差。

图片在这里加载。

From your screenshot I can see one use of %H in which you set a time_zone variable to {{ 'now' | date: " %H %M " }}从您的屏幕截图中,我可以看到%H的一种用法,其中您将time_zone变量设置为{{ 'now' | date: " %H %M " }} {{ 'now' | date: " %H %M " }} . {{ 'now' | date: " %H %M " }} I can then see you are comparing that time_zone variable as a time.然后我可以看到您正在将该time_zone变量作为时间进行比较。

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 ".当您在 Studio 中比较时间时,您需要以“HH:MM”的形式提供时间,但您似乎以“HH MM”的格式提供时间。

Try setting the variable to be {{ 'now' | date: "%H:%M" }}尝试将变量设置为{{ 'now' | date: "%H:%M" }} {{ 'now' | date: "%H:%M" }} and see if things work. {{ 'now' | date: "%H:%M" }}看看是否可行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM