Re: Format string for ISO-8601 date and time - Mailing list pgsql-general

From Daniel Verite
Subject Re: Format string for ISO-8601 date and time
Date
Msg-id af938ff5-f371-4995-8ed4-fa21cb6ad37b@mm
Whole thread Raw
In response to Re: Format string for ISO-8601 date and time  (Sam Mason <sam@samason.me.uk>)
List pgsql-general
    Sam Mason wrote:

>   1) values of type "timestamp with time zone" are always converted
>   to UTC (either using the timezone specified or using the session's
>   current "timezone" value) and then when they're sent back to the
value
>   is then corrected to the session's timezone (or an explicit AT TIME
>   ZONE can be specified).
>
>   2) values of type "timestamp without time zone" (or alternatively
>   spelled just "timestamp") ignore any timezone specified and assume
the
>   value is UTC.
>
> I find it all quite confusing (and hence the above may be wrong) but
> have the luxury of ignoring it as all as my users are in the same
> timezone.  That said, it's a useful set of abstractions as lots of
> people use them regularly.

Thanks, I was aware already that "timestamp with time zone" doesn't
store any timezone contrary to what its name seems to imply. (Though
when I first started with PG some years ago, I sure fell in that trap)

Best regards,

--
 Daniel

pgsql-general by date:

Previous
From: Justin
Date:
Subject: Re: foxpro, odbc, data types and unnecessary convertions
Next
From: Pavel Stehule
Date:
Subject: Re: Format string for ISO-8601 date and time