title: Postgres: get local timestamp with time zone of latest midnight
body: <p>I'm in the Time Zone Europe/Berlin (+02), Postgresql is running at UTC (+00).
  I need to get the timestamp with time zone at the latest local midnight date (The start of day date of the current day in my time zone).</p>
  
  <p>So my end result would be something like this if we have 2013-03-03 14:00:00+02</p>
  
  <pre><code>2013-03-03 22:00:00+00
  2013-03-04 00:00:00+02 // the same
  </code></pre>
  
  <p>I tried to get this date with</p>
  
  <pre><code>SELECT TIMESTAMP 'today' AT TIME ZONE 'Europe/Berlin'
  </code></pre>
  
  <p>Unfortunately this yields the wrong date (the previous day midnight) during 00:00 and 02:00 as the UTC time is stil at the previous day and today seems to use utc to calculate the rest.</p>
  
  <p>If we have 2013-03-03 00:05 at Europe/Berlin this will return</p>
  
  <pre><code>2013-05-01 22:00:00+00
  </code></pre>
  
  <p>If I want to have the correct date I need to use</p>
  
  <pre><code>SELECT date_trunc('day', now() AT TIME ZONE 'Europe/Berlin') AT TIME ZONE 'Europe/Berlin';
  2013-05-02 22:00:00+00
  </code></pre>
  
  <p>which is correct, but quite ugly.</p>
  
  <p>Is there a cleaner variant of this command?</p>