Re: BUG #12326: I think maybe postgresql has a problem about timezone.

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: BUG #12326: I think maybe postgresql has a problem about timezone.
Дата
Msg-id 549AFF7B.4070601@hogranch.com
обсуждение исходный текст
Ответ на Re: BUG #12326: I think maybe postgresql has a problem about timezone.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 12/24/2014 7:11 AM, Tom Lane wrote:
>> # update history_configuration set var_datetime = 'Wed Dec 24 18:52:46 CST
>>> >>2014' where var_name = 'lastHourAggr';
>> ># select * from history_configuration ;
>> >      var_name      | var_value |      var_datetime
>> >-------------------+-----------+------------------------
>> >  lastHourAggr      |           | 2014-12-25 08:52:46+08
> As John says, this behavior is perfectly expected because Postgres thinks
> "CST" means US Central Standard Time (GMT-6, currently).
>
> If you want CST to mean China Standard Time, you'll need to set up a
> custom zone abbreviation file.  See
> http://www.postgresql.org/docs/9.3/static/datetime-config-files.html
>
> For some reason this interpretation of "CST" got missed out when preparing
> the sample data in Asia.txt, but I think what you need is just

we ran into this same problem in our java software (Java's Date object
returning CST for China), and we fixed it via using some option in Java
that output the time in an ISO format, like '2014-12-25 18:52:46+08',
which removes all ambiguity.   I'm not the Java programmer, so I don't
know what the exact code fix was.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #12292: index row size 1480 exceeds maximum 1352 for index
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #12292: index row size 1480 exceeds maximum 1352 for index