Example of converting date time from UTC to a specific time zone.

Options
micajblock
edited February 11, 2022 in Analytics #1
Example of how to convert time zones. For this example I used a CSV file that includes the current time zones with offsets (these might change). This CSV files is used for a parameter selector. I am using a scripted data set to display 24 rows for 24 hours. This report will then convert these times (assuming they dates are in UTC) to selected time zone.<br />
<br />
An alternative approach would be to use public services to get time zone information. Examples are:<br />
<br />
Google has one based on geo location - https://developers.google.com/maps/documentation/timezone/intro<br />
<br />
Timezonedb has one based on s time zone code - https://timezonedb.com/references/get-time-zone