cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Time Zone Conversion

It would be extremely helpful to have a built in function to convert a time stamp between time zones using the tz database (more info: https://data.iana.org/time-zones/tz-link.html and https://en.wikipedia.org/wiki/Tz_database).  I regularly need to convert time stamps from one time zone to another, but can't simply apply an offset, but it is time consuming to have to look up the offsets to convert the time stamp.  Additionally, there is extra work required since certain locations have daylight saving time and others don't, and daylight saving time start/end dates are location specific.

 

This function could be something like this:

 

ConvertTimeZone( ts, tzFrom, tzTo ) //ts is the time stamp will be converted from tzFrom to tzTo

//example
ConvertTimeZone( 05May2022:19:31:07, "UTC", "America/Los_Angeles" ) //result: 05May2022:12:31:07

 

 

Ideally, all datetime values would be changed to contain the time zone, and be set to default of UTC, if not specified.

 

Each time zone should use the TZ database name (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), as is used in other programming languages (e.g.: Python).

 

Here is a question about this issue: https://community.jmp.com/t5/Discussions/Time-zone-conversion/m-p/331514#M58032

 

For a very humorous description of the time zone issue, watch this video: https://www.youtube.com/watch?v=-5wpm-gesOY&t=3s. It is 10 minutes long, but well worth the *time* (pardon the pun).

4 Comments
Craige_Hales
Super User

Nice video reference, thanks.

 

JSL BLOB in an ESP32 Clock  discuses some of the timezone issues. I also briefly understood the International Dateline better after making this video with two day names at the bottom edge.

 

Working with time is really hard.

Status changed to: Acknowledged

Hi @Judah, thank you for your suggestion! We have captured your request and will take it under consideration.

SamGardner
Level VII
Status changed to: Investigating
 
SamGardner
Level VII
Status changed to: Not Planned For Now

@Judah Thanks again for the idea.  After some research, we have decided to not pursue this at this time.