Re: select current UTC time ? - Mailing list pgsql-admin

From Rainer Bauer
Subject Re: select current UTC time ?
Date
Msg-id gceg449s5gsm0nl5sv3hrt4q7325rp9tcm@4ax.com
Whole thread Raw
In response to select current UTC time ?  (kevin kempter <kevin@kevinkempterllc.com>)
List pgsql-admin
kevin kempter wrote:

>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 ?'

SELECT EXTRACT('epoch' FROM CURRENT_TIMESTAMP AT TIME ZONE 'UTC')::bigint::int

Rainer

pgsql-admin by date:

Previous
From: kevin kempter
Date:
Subject: Re: select current UTC time ? (SOLVED)
Next
From: "Scott Whitney"
Date:
Subject: Re: select current UTC time ?