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

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: PostgreSQL List - Novice <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:29:47
Message-ID: 4CF712AB.2050609@sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 12/01/10 22:03, Basil Bourque wrote:
> 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)

select (current_timestamp at time zone 'ZULU')||'+00';

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Guenther Boelter 2010-12-02 04:04:36 Best practice to move from MySQL to PostgreSQL
Previous Message Tom Lane 2010-12-02 03:18:44 Re: Get server's time in UTC time zone, in ISO 8601 format