Timezone

Hello,

I have a table in 'comment' with columns: id, timestamp, from, recipient, and content. The timestamp column is initialized with the NOW() formula, displaying the current time in my UTC+11 time zone when adding new data. How can I make sure users in different time zones see the timestamp column values adjusted to their respective time zones? I assume I need to use a virtual column here.

Thank you for your help.

0 2 52
2 REPLIES 2

In your case I would use UTCNOW() with the initial value and then yes, virtual column to show it according to timezone. Though it's not bullet proof as the user can adjust the timezone from his/her device.

I was just about to suggest UTCNOW(), specifically "(NOW() - UTCNOW()) returns a Duration value giving the difference between UTC and local time." as explained here:
https://support.google.com/appsheet/answer/10107371

In addition, you might want to refer to the following explanation by ChatGPT.  It fails to suggest UTCNOW(), and seems to misunderstand USERLOCALE(), but otherwise I think it's basically on the right track:
https://chat.openai.com/share/f35d3505-0057-4ebd-9ff3-4a67d48bdbe0

By the way, @AleksiAlkio working on this question has caused me to recall with gratitude all of the help you have given me over the years with the display and calculation of dates and times, as well as with other issues.  In that sense, you might be interested in the following "tip" of mine:
https://www.googlecloudcommunity.com/gc/Tips-Tricks/Beware-of-TEXT-date-expressions-on-devices-with-...
It points out that, in it's current configuration, the AppSheet platform displays  some TEXT() date and time expressions differently, depending on the primary language designation on the user's device.  I think this is problematic.  I decided not to wait for an AppSheet fix and to fix the problem on my side with more complicated expressions.  But, you may be interested in the issue I found; I would guess that many users throughout the world might be affected.

Top Labels in this Space