Forum OpenACS Q&A: Response to to_char(now(), 'YYYY') and time zones

Collapse
Posted by Dan Wickstrom on
If you need the time, you could just get the substring that corresponds to the time:

openacs4=# select substr(now() at time zone 'utc',11,6);
 substr
--------
  12:19
(1 row)
 
openacs4=# select now() at time zone 'utc';
        timezone
------------------------
 2001-04-12 12:19:58+00
(1 row)