I am using dynamic selection of time zones to show users when tickets are submitted in the data base. This use to work with no errors but now when editing a time it no longer submits their local time, it submits UTC time from their local time. Then will do the conversion again when loading.
For example:
Database original - 10:15 am Texas Time (-5)
Change to - 10:30 am Texas Time (-5)
Database saves as - 10:30am UTC (0)
New loaded time - 5:30am Texas Time (-5)
This creates an offset when saving new dates. This use to not be an issue but I'm noticing it with the dateTime component and updating dateTime in tables.
I noticed you encountered a datetime error related to the UTC timezone. In Retool, there's a useful setting called Manage Timezone that can help handle this more effectively.
When this option is enabled, Retool provides two fields:
Display Timezone β how the time appears to users
Value Timezone β how the time is stored or sent to the backend
This is especially helpful when you're dealing with different timezones across your team or user base.
Let me explain more. I want to emphasis this use to work without issue for over 3 months and then suddenly it updates incorrectly similarly to the linked community post above.
The timezone is being controlled by the user dynamically.
The datetime is showing UTC
The user is able to change the timezone by the select at the top and the dates in the table would properly update. That still works but when editing an entry the datetime is not respecting the users local time like it use to.
Pre edited date:
edited to 9:30
I save it and refresh, it then loads as
I believe this issue is when happening because when saving the date it no longer respects the users local time. I don't know what I can do in the save event handler in order to stop this from happening as I'm just updating off the changeset array.
When I look at the previous post it looked like it was something the Retool team updated that ended up fixing it. Any additional help is greatly appreciated.
Thanks for your response! I'd like to provide more details to help clarify the issue.
As you mentioned, users should be able to select their timezone dynamically. To support this, I created a transformer to populate the timezone options in the tab component. Here's the code I used:
On the datetime field, I made the value dynamic by referencing the selected tabβs value:
{{ tabs1.value }}
This approach ensures that the date and time selected by the user are saved according to their chosen timezone offset. The goal is to have user inputs correctly recorded based on the timezone selected via tabs, which should help with proper time tracking across regions.
Let me know if you have any suggestions or see any potential improvements. Thanks again!