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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 张亚琪 <zhangyingyun001(at)gmail(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12326: I think maybe postgresql has a problem about timezone.
Date: 2014-12-24 15:11:58
Message-ID: 6076.1419433918@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?UTF-8?B?5byg5Lqa55Cq?= <zhangyingyun001(at)gmail(dot)com> writes:
> show timezone;
> TimeZone
> ----------
> PRC
> (1 row)

> # 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

@INCLUDE Default
@OVERRIDE
CST 28800

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-12-24 16:44:19 Re: BUG #12292: index row size 1480 exceeds maximum 1352 for index
Previous Message Jeff Janes 2014-12-24 15:05:11 Re: BUG #12326: I think maybe postgresql has a problem about timezone.