Help needed - display a time based on users time zone


Does anyone know how to display a time based on user’s timezone?

I saw i can use users location but I feel it wont be easy going this road(how to get time zone based on that location)

Is there an easy way to do that?

Hello @Leon_Kol ,

You could allow each user in their profile to choose their timezone manually from a list.

Then you just have to offset their time from your sheets local time (your time) and then there time will be available.

Please note that unless you have your sheet updating automatically (paid plans) your users will have to manually trigger a refresh to show the current time (any update to the sheet from glide will do so). I have my time shown in an action text component with the title “Current Time (tap to refresh)” with a configured action to simply increment a “refresh” cell on my sheet. This causes the app to pull the new time data.

I just went to wikipedia and grabbed the timezone table, then in each of the users rows I added a time and timezone field. The time takes the sheet time (from somewhere in my sheet) and adds/subtracts the timezone choice (adjusting for my timezone not being UTC).

Please let me know if you have any questions, I have put the above together and it is working.

Good luck!

how do you adds/subtracts the timezone choice?

@Mark @Jeff_Hager
Would you have any idea how to do that?
Sheets Script can help?

If i run
new Date()
It will get me the sheets timezone right?

You have the timezone information upon each user’s registration. Extract the timezone VALUE using a RIGHT formula (if I recall right about the timezone format, it’s UTC plus a number?). Then you can do calculation with that formula, but it would all be done in the Sheets.

How to you get a timezone upon registration?
I have only a position and i extracted timezone

RIGHT formula useful to return a substring from the end of a string

so I don’t see how it helps

Here, it would be much easier if you ask them to fill in a choice upon registration, rather than trying to get it from the location.

Either way,

How to convert from one time zone to another?

Would this work for you?

Formula in glide or Sheets?

It should be the done in the Sheets because Glide hasn’t supported calculation with time yet.