Re: ISO8601 vs POSIX offset clarification

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bharanee Rathna <deepfryed(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: ISO8601 vs POSIX offset clarification
Date: 2017-12-04 14:58:28
Message-ID: 17467.1512399508@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bharanee Rathna <deepfryed(at)gmail(dot)com> writes:
> To be more specific, I expected the output of both these queries to be the
> same.
> # select '2017-12-01 11:00:00 +11:00'::timestamp with time zone at time
> zone '+11:00';
> # select '2017-12-01 11:00:00 +11:00'::timestamp with time zone at time
> zone 'Australia/Melbourne';

The +11 in your timestamp input value is per ISO convention, but the
argument of AT TIME ZONE is a zone name, so it follows the POSIX
convention if it's numeric.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2017-12-04 15:01:36 Re: Centos 6.9 and centos 7
Previous Message Nicola Contu 2017-12-04 14:51:53 Re: Centos 6.9 and centos 7