Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. SELECT '1-1-2014 02:00:00'::timestamp at time zone 'America/Los_Angeles';
  2.  
  3. 2014-01-01 02:00:00-08
  4.  
  5. SELECT CAST('1-1-2014 02:00:00'::timestamp at time zone 'America/Los_Angeles' AS Date);
  6.  
  7. 2014-01-01
  8.  
  9. SELECT CAST('1-1-2014 00:02:00'::timestamp at time zone 'America/Los_Angeles' AS Date) at time zone 'America/Los_Angeles';
  10.  
  11. 2014-01-01 00:00:00
  12.  
  13. SELECT '1-1-2014 02:00:00'::timestamp at time zone 'UTC' at time zone 'America/Los_Angeles';
  14. timezone
  15. ---------------------
  16. 2013-12-31 18:00:00
  17.  
  18. SELECT '1-1-2014 02:00:00'::timestamp + INTERVAL '1 hour' * extract(timezone_hour FROM '1-1-2014 00:02:00'::timestamp at time zone 'America/Los_Angeles');
  19.  
  20. SELECT ('2014-01-01 02:00:00'::timestamp AT TIME ZONE 'UTC')::date
  21.  
  22. SELECT '2014-01-01 02:00:00+0'::timestamptz::date
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement