Wondering if someone had the same issue -
Comparing a database field for “Date” and variable Current Time doesn’t work properly.
When you create a conditional action (Happens “Sometimes”) and compare a stored date in the database to the Current Time, the result is false even when the date in both is the same!
Until a certain time in the day when it suddenly becomes true.
Is seems that the Current Time variable doesn’t relate to the user’s Timezone but to UTC stored in the database??
The problem is that the “Current Time” variable is in UTC when you apply “No formatting”. However, as soon as you apply any formatting, it gets converted to the device’s timezone…
And since the conditional trigger compares dates based on the database format i.e. “No formatting”, the “Current Time” variable is always going to be in UTC. So basically there is no way I can properly compare dates in user’s timezone?
My end goal is to determine if the user’s date is now > than the stored date value in the collection, and trigger a custom action based on that, but if I have no way of actually storing the user’s date in the collection I don’t see how I can achieve this.
@Yongki @Colin - I’m sure you’ll say it’s by design but it feels more like a bug
I’m trying to understand how this could help me.
In your example, the date and times are still based on UTC right?
The challenge is - how do you store and do calculations based on user’s local time?
I need to know if “today” for user is before another stored date/time. But there doesn’t seem to be a way to store “today” that is based on the user’s timezone, it will always be stored as UTC which may end up being a day earlier or a day later in user’s timezone.
If I create new project with this action button and select both start date and end date to be today, there will be 2 additional actions after update form action that update start date time and end date time marking them as today, as explained in that post.
We can use this start date time and end date time to check any date time outside this range.