Re: Setting timezone: is it bug or intended?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Setting timezone: is it bug or intended?
Дата
Msg-id 201104262130.p3QLUQI10021@momjian.us
обсуждение исходный текст
Ответ на Re: Setting timezone: is it bug or intended?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Setting timezone: is it bug or intended?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > As far as how to even document this, I have no idea.
>
> It already is documented.  See
> http://developer.postgresql.org/pgdocs/postgres/datatype-datetime.html#DATATYPE-TIMEZONES
> specifically the point that POSIX zone names have the opposite sign
> convention from ISO-8601.
>
> The great thing about standards is there are so many to choose from ;-)

What isn't documented is why the sign changes for +0300 but not +03:

    test=> set timezone='+03:00';
    SET
    test=> select now();
                  now
    -------------------------------
     2011-04-26 18:22:55.571638-03
    (1 row)

    test=> set timezone='+03';
    SET
    test=> select now();
                  now
    -------------------------------
     2011-04-27 00:23:00.627179+03
    (1 row)

It is the colon somehow:

    test=> set timezone='+03:';
    ERROR:  invalid value for parameter "TimeZone": "+03:"
    test=> select now();
                  now
    -------------------------------
     2011-04-26 18:24:36.921323-03
    (1 row)

    test=> set timezone='+03:0';
    SET
    test=> select now();
                 now
    ------------------------------
     2011-04-26 18:25:09.88588-03
    (1 row)

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Setting timezone: is it bug or intended?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Setting timezone: is it bug or intended?