It looks like when using a Unix epoch in a table, with the column type set to Datetime, it's automatically converting it to my local browser timezone before having enabled the "Manage time zone" setting:
It should be rendering in its native UTC time until that setting is enabled, at which point I could properly convert it to any other timezone.
Hey @michaelyork
When you set the Column Type to Datetime in a table, Retool automatically converts the Unix epoch to the local timezone of the user's browser by default. If you want to display the time in UTC or manage time zones properly, you need to toggle on the Manage time zone option. This will allow you to convert the displayed time to any specified timezone while keeping the underlying value intact.
You can set it to display in UTC, a specific offset, or Local time based on your needs. To ensure the display is accurate for your use case, remember to adjust these settings as needed.
1 Like
Thanks for the reply @WidleStudioLLP , but doesnβt this confirm the underlying bug?
If you select Manage time zone and choose UTC as the source tz, it will be incorrect. But that is actually the nature of the epoch.
Hi @michaelyork,
You're absolutely right β that is indeed the bug. I was just offering an alternative approach for your consideration.
When you set the Column Type to Datetime and enable Manage time zone, the default behavior is to adjust the display based on the selected time zone. If you choose UTC as the source time zone, it should ideally show the time correctly in UTC format. However, because Unix timestamp values inherently represent UTC, selecting UTC may not yield the expected results if the conversion and management of time zones are not applied as intended.
1 Like
Gotcha, thank you. Hope the Retool folks see this and get it patched up properly!
1 Like
Hi @michaelyork, thanks for calling this out! I was able to reproduce this on my end and I would agree, this is unusual behavior since typically the time in other formats is not automatically converted to local time. I went ahead and sent in a request to fix this issue.