'BigQuery timestamp_trunc not applying timezone

According to Google BigQuery's documentation this is how to apply timezones to timestamp_trunc:

SELECT
  timestamp_value AS timestamp_value,
  TIMESTAMP_TRUNC(timestamp_value, WEEK(MONDAY), "UTC") AS utc_truncated,
  TIMESTAMP_TRUNC(timestamp_value, WEEK(MONDAY), "Pacific/Auckland") AS nzdt_truncated
FROM (SELECT TIMESTAMP("2017-11-06 00:00:00+12") AS timestamp_value);

-- Display of results may differ, depending upon the environment and time zone where this query was executed.
+-------------------------+-------------------------+-------------------------+
| timestamp_value         | utc_truncated           | nzdt_truncated          |
+-------------------------+-------------------------+-------------------------+
| 2017-11-05 12:00:00 UTC | 2017-10-30 00:00:00 UTC | 2017-11-05 11:00:00 UTC |
+-------------------------+-------------------------+-------------------------+

I ran this (my timestamp column is a 'timestamp' type and my data is in UTC-0):

select TIMESTAMP_TRUNC(timestamp, MINUTE) as timestamp
,TIMESTAMP_TRUNC(timestamp, MINUTE, "America/New_York") as ny_timestamp
from table

And got the same value in both columns.

The documentation claims to support timezones on minute truncation but it doesn't appear to be converting my timestamp to the right zone.

If you know what I'm doing incorrectly, please let me know. I'm stumped. Any help is appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source