Skip to content
Advertisement

SnowFlake Convert_timezone function format mapping

Problem

My 24 timezone codes are like EAT, ICT, NZT and I need to use the SnowFlake Convert_timezone function to convert the American Eastern time to the timezone that the records have. But SnowFlake Convert_timezone function only supports timezone in standard iana.org time zones format. So what is the best way to map my 24 time zone to the right formate so that the function can work as expected?

I did not figure out how to set up the standard iana.org time zones database and how to convert my time zone code into theirs, please help! thanks in advance!

Sample code

Convert_timezone('American/New_York', my_time_zone_code, my_timestamp) as normalized_time

Error

Unknown timezone: PST

Advertisement

Answer

  1. EAT

East Africa Time, or EAT, is a time zone used in eastern Africa. The time zone is three hours ahead of UTC (UTC+03:00), which is the same as Moscow Time, Arabia Standard Time, Further-eastern European Time and Eastern European Summer Time.

Can be safely mapped with snowflake time as below

Africa/Nairobi

  1. ICT

Indochina Time (ICT) is 7 hours ahead of Coordinated Universal Time (UTC). Iana Timezones where ICT is currently observed.

Can be safely mapped with snowflake time as

Asia/Ho_Chi_Minh
Asia/Bangkok
Asia/Phnom_Penh
Asia/Vientiane

  1. NZT

Most of the time of NZT will be associated with below two zones, to covert it to snowflake standards you have to divide these zones based on location either one of them

  • Pacific/Auckland

    Pacific/Chatham

Hope this will help

Thanks Palash

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement