Date/Last Modified field not respecting time zone with date_diff

I’m trying to get the difference between a datetime in a last modified field and a datetime in a regular date field. When I input the current date and time into the date field (so the last modified date and time becomes the same), the date_diff function gives me a difference of 5 or -5 hours. As it turns out, my time zone is UTC-5.

So, either date fields or last modified fields aren’t respecting time zones. When I put the date field as the second argument and the last modified field as the third argument in date_diff, I get positive 5 for the difference in hours, so I think that means that date fields are in UTC and last modified fields are in local time.

Hello @Jamac, we’ll check this :ok_hand:

Hello @Jamac,

sorry for the late reply.

Yes, you are right. Currently, the last modified field uses the timezone (which you can see in the edit field context menu), while the date fields save dates in UTC.

We’ll probably add some more settings to make this clearer or to handle different time zones in the date fields, but I cannot say exactly when yet.

1 Like