79743871

Date: 2025-08-22 21:38:43
Score: 0.5
Natty:
Report link

In case anyone else runs into the same issue, here is the workaround I've come up with. Like Nick mentioned, my original timestamp didn't store any time zone information, so I had to use the more general TO_TIMESTAMP() function, perform the calculation in UTC, and then convert back to Pacific.

SELECT
    TO_TIMESTAMP('2025-01-30 23:19:45.000') as ts
    ,CONVERT_TIMEZONE('UTC', 'America/Los_Angeles', DATEADD(DAY, 90, CONVERT_TIMEZONE('America/Los_Angeles', 'UTC', ts))) as ts_pdt
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: dnaeye