Time in Variable

Not officially. There’s an undocumented $context.event.timestamp variable, but it’s in UTC so I don’t think it would be useful in the way many people would want to use it.

Feel free to create a feature request! When we originally built out the context variables concept, we bounced around the idea of time related data, but we weren’t sure what the use-cases were… and we figured there would be other requirements (eg. display format, which timezone, etc) but hadn’t heard any requests for it, so we prioritized other requested features.

You can use time within IF conditions, so you could accomplish what you’re looking for in your example rule.

Since we know the triggers are 6PM and 9PM, we can use a time condition that checks if it’s before or after some time between the two triggers. In other words: if it’s before 7PM then it’s our 6PM trigger, otherwise it’s after 7PM so it’s our 9PM trigger

2 Likes