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.
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.
I came here to ask for the exact same! I am UTC-8 and even setting a TZ: America/Los_Angeles in my docker compose is not working. (I also tried with TZ:'America/Los_Angeles). I understand the need for things to be more universally compatible across all world timezones, but why not allow the end user to set it up in their docker-compose if self hosted like I am?
Or if not via an environment variable (Which may save time), allow the user to set it up via the GUI!