Skip to content

Instantly share code, notes, and snippets.

@benwilson512
Created November 1, 2025 21:30
Show Gist options
  • Save benwilson512/bd401848cdd0c2f71a3db445b06d8072 to your computer and use it in GitHub Desktop.
Save benwilson512/bd401848cdd0c2f71a3db445b06d8072 to your computer and use it in GitHub Desktop.
case coalesce(origin.timezone, 'UTC')
when 'America/New_York' then toDateTime(s.starts_at, 'America/New_York')
when 'America/Chicago' then toDateTime(s.starts_at, 'America/Chicago')
when 'America/Denver' then toDateTime(s.starts_at, 'America/Denver')
when 'America/Detroit' then toDateTime(s.starts_at, 'America/Detroit')
when 'America/Los_Angeles' then toDateTime(s.starts_at, 'America/Los_Angeles')
when 'America/Phoenix' then toDateTime(s.starts_at, 'America/Phoenix')
when 'America/Indiana/Indianapolis' then toDateTime(s.starts_at, 'America/Indiana/Indianapolis')
when 'Europe/Berlin' then toDateTime(s.starts_at, 'Europe/Berlin')
when 'Europe/Dublin' then toDateTime(s.starts_at, 'Europe/Dublin')
when 'America/Boise' then toDateTime(s.starts_at, 'America/Boise')
when 'Pacific/Honolulu' then toDateTime(s.starts_at, 'Pacific/Honolulu')
when 'America/St_Thomas' then toDateTime(s.starts_at, 'America/St_Thomas')
when 'America/Anchorage' then toDateTime(s.starts_at, 'America/Anchorage')
when 'America/Indiana/Vincennes' then toDateTime(s.starts_at, 'America/Indiana/Vincennes')
when 'Europe/Madrid' then toDateTime(s.starts_at, 'Europe/Madrid')
when 'Europe/Lisbon' then toDateTime(s.starts_at, 'Europe/Lisbon')
when 'Europe/Paris' then toDateTime(s.starts_at, 'Europe/Paris')
when 'America/Puerto_Rico' then toDateTime(s.starts_at, 'America/Puerto_Rico')
when 'Europe/Warsaw' then toDateTime(s.starts_at, 'Europe/Warsaw')
when 'Europe/Oslo' then toDateTime(s.starts_at, 'Europe/Oslo')
when 'America/Winnipeg' then toDateTime(s.starts_at, 'America/Winnipeg')
when 'Europe/Bratislava' then toDateTime(s.starts_at, 'Europe/Bratislava')
when 'Europe/Prague' then toDateTime(s.starts_at, 'Europe/Prague')
when 'Europe/Rome' then toDateTime(s.starts_at, 'Europe/Rome')
when 'America/Indiana/Petersburg' then toDateTime(s.starts_at, 'America/Indiana/Petersburg')
when 'America/Indiana/Tell_City' then toDateTime(s.starts_at, 'America/Indiana/Tell_City')
when 'Europe/Sofia' then toDateTime(s.starts_at, 'Europe/Sofia')
when 'Europe/Athens' then toDateTime(s.starts_at, 'Europe/Athens')
when 'Pacific/Saipan' then toDateTime(s.starts_at, 'Pacific/Saipan')
when 'Europe/Vienna' then toDateTime(s.starts_at, 'Europe/Vienna')
when 'Europe/Amsterdam' then toDateTime(s.starts_at, 'Europe/Amsterdam')
when 'Europe/Riga' then toDateTime(s.starts_at, 'Europe/Riga')
when 'Pacific/Majuro' then toDateTime(s.starts_at, 'Pacific/Majuro')
when 'America/Toronto' then toDateTime(s.starts_at, 'America/Toronto')
when 'Europe/Zagreb' then toDateTime(s.starts_at, 'Europe/Zagreb')
when 'America/Edmonton' then toDateTime(s.starts_at, 'America/Edmonton')
when 'Europe/Budapest' then toDateTime(s.starts_at, 'Europe/Budapest')
when 'Europe/Bucharest' then toDateTime(s.starts_at, 'Europe/Bucharest')
when 'Europe/Brussels' then toDateTime(s.starts_at, 'Europe/Brussels')
when 'Europe/Ljubljana' then toDateTime(s.starts_at, 'Europe/Ljubljana')
when 'Europe/Copenhagen' then toDateTime(s.starts_at, 'Europe/Copenhagen')
when 'America/North_Dakota/Beulah' then toDateTime(s.starts_at, 'America/North_Dakota/Beulah')
when 'America/Indiana/Knox' then toDateTime(s.starts_at, 'America/Indiana/Knox')
when 'Asia/Tokyo' then toDateTime(s.starts_at, 'Asia/Tokyo')
when 'Europe/Stockholm' then toDateTime(s.starts_at, 'Europe/Stockholm')
when 'Europe/London' then toDateTime(s.starts_at, 'Europe/London')
when 'America/Monterrey' then toDateTime(s.starts_at, 'America/Monterrey')
when 'Europe/Zurich' then toDateTime(s.starts_at, 'Europe/Zurich')
when 'America/Indiana/Winamac' then toDateTime(s.starts_at, 'America/Indiana/Winamac')
when 'Europe/Kiev' then toDateTime(s.starts_at, 'Europe/Kiev')
when 'America/Indiana/Marengo' then toDateTime(s.starts_at, 'America/Indiana/Marengo')
when 'America/Vancouver' then toDateTime(s.starts_at, 'America/Vancouver')
when 'America/Whitehorse' then toDateTime(s.starts_at, 'America/Whitehorse')
when 'America/Sao_Paulo' then toDateTime(s.starts_at, 'America/Sao_Paulo')
when 'Atlantic/Canary' then toDateTime(s.starts_at, 'Atlantic/Canary')
when 'Europe/Vilnius' then toDateTime(s.starts_at, 'Europe/Vilnius')
when 'Europe/Tirane' then toDateTime(s.starts_at, 'Europe/Tirane')
when 'Pacific/Tarawa' then toDateTime(s.starts_at, 'Pacific/Tarawa')
when 'Australia/Darwin' then toDateTime(s.starts_at, 'Australia/Darwin')
when 'America/Ciudad_Juarez' then toDateTime(s.starts_at, 'America/Ciudad_Juarez')
when 'Europe/Tallinn' then toDateTime(s.starts_at, 'Europe/Tallinn')
when 'Europe/Helsinki' then toDateTime(s.starts_at, 'Europe/Helsinki')
when 'Europe/Malta' then toDateTime(s.starts_at, 'Europe/Malta')
when 'Asia/Seoul' then toDateTime(s.starts_at, 'Asia/Seoul')
when 'America/Mexico_City' then toDateTime(s.starts_at, 'America/Mexico_City')
when 'America/Matamoros' then toDateTime(s.starts_at, 'America/Matamoros')
when 'America/Adak' then toDateTime(s.starts_at, 'America/Adak')
when 'America/Tijuana' then toDateTime(s.starts_at, 'America/Tijuana')
when 'Asia/Dhaka' then toDateTime(s.starts_at, 'Asia/Dhaka')
when 'UTC' then toDateTime(s.starts_at, 'UTC')
end as `Shipment Starts At`,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment