Re: timezone() with timeofday() converts the wrong direction? - Mailing list pgsql-general

From Steve - DND
Subject Re: timezone() with timeofday() converts the wrong direction?
Date
Msg-id LDEHKBBOEMIJKHKBOFNFEEGONGAA.postgres@digitalnothing.com
Whole thread Raw
In response to Re: timezone() with timeofday() converts the wrong direction?  (Michael Fuhr <mike@fuhr.org>)
Responses Re: timezone() with timeofday() converts the wrong direction?  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
>
> Perhaps this is what you want:
>
>   SELECT timezone('UTC', timeofday()::timestamptz);

That did it. Strangely, I thought I had tried that already, but I must not
have. My next question would be if I did:

    SELECT timezone('UTC', timeofday()::timestamptz):timestamptz;

Why do I get the timezone value as being -07(my local offset), instead
of -00?

Thanks,
Steve



pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: timezone() with timeofday() converts the wrong direction?
Next
From: Thomas Hallgren
Date:
Subject: Returning a RECORD, not SETOF RECORD