Re: Get server's time in UTC time zone, in ISO 8601 format

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Basil Bourque <basil(dot)list(at)me(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Get server's time in UTC time zone, in ISO 8601 format
Date: 2010-12-02 03:18:44
Message-ID: 27089.1291259924@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Basil Bourque <basil(dot)list(at)me(dot)com> writes:
> --> How to get the server's time in UTC time zone ('ZULU'), in ISO 8601 format, by executing a simple SELECT statement?

You already found it:

> select current_timestamp AT TIME ZONE 'ZULU'
> That does indeed give me the UTC time, but without a timezone on the end such as +00 or z or zulu:
> 2010-12-02 00:29:05.735597
> Note the lack of +00 on end (that's a bad thing)

Why do you need that? You told it what time zone you wanted.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Frank Bax 2010-12-02 03:29:47 Re: Get server's time in UTC time zone, in ISO 8601 format
Previous Message Basil Bourque 2010-12-02 03:03:23 Get server's time in UTC time zone, in ISO 8601 format