title: Can't extract timezone_hour from postgres timestamp
body: <p><code>ERROR:  timestamp units "timezone" not supported</code></p>
  
  <p>That's the error I get for all timezone fields.</p>
  
  <p>Here's a minimal query you can run:</p>
  
  <pre><code>select extract(timezone_hour from now()::timestamptz at time zone 'US/Eastern');
  </code></pre>
  
  <p>What I want is the utc offset in hours. So this should return -4.</p>
  
  <p>The requirement is that I use a dynamic time zone in the query. So I have a table of "facilities" with time zone strings, and I need to get the current time for each one.</p>
  
  <p>So my end query should look something like this:</p>
  
  <pre><code>SELECT
      EXTRACT(timezone_hour from now() with time zone timezone)  # timezone is the name of the field
  FROM facilities;
  </code></pre>
  
  <p>I thought I had it for a second with this, but this is giving me my current offset, not the offset of the tz I'm passing:</p>
  
  <pre><code>select 
      extract(timezone_hour from (select now()::timestamp at time zone 'US/Eastern'))
  
   date_part 
  -----------
          -7
  </code></pre>
  
  <p>I ended up getting this to work with creating two timestamps, one at utc and one at the desired time zone, but I'll leave this open just in case there's a better solution than my current one:</p>
  
  <pre><code>select 
      extract(hour from (
                     select (
                         select now() at time zone 'US/Eastern') - (select now() at time zone 'UTC')));
  
   date_part 
  -----------
          -4
  </code></pre>