From: Scott Whitney <swhitney@journyx.com>
To: pgsql-admin@postgresql.org
Subject: Re: select current UTC time ?
Date: Thu, 5 Jun 2008 14:12:36 -0500
Message-ID: <20080605190932.926723E20E8@mail.int.journyx.com> (raw)
In-Reply-To: <1CA79562-D691-430C-B1EC-9931EF0BF7C2@kevinkempterllc.com>
This seems to work for me:
template1=# select now() at time zone 'UTC';
timezone
----------------------------
2008-06-05 19:08:50.590806
(1 row)
template1=# select now();
now
-------------------------------
2008-06-05 14:08:57.278037-05
Cheers.
-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of kevin kempter
Sent: Jun 05, 2008 2:01 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] select current UTC time ?
Hi List;
How could I select the current UTC time ? now() cast as a timestamp
at UTC is wrong because it takes now() and says: if it were now() time
UTC what would it be here (timezone) and returns that. I want to
return 'what time is it now in UTC ?'
Thanks in advance...
/Kevin
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: swhitney@journyx.com
Subject: Re: select current UTC time ?
In-Reply-To: <20080605190932.926723E20E8@mail.int.journyx.com>
References: <1CA79562-D691-430C-B1EC-9931EF0BF7C2@kevinkempterllc.com> <20080605190932.926723E20E8@mail.int.journyx.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox