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

From: 张亚琪 <zhangyingyun001(at)gmail(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12326: I think maybe postgresql has a problem about timezone.
Date: 2014-12-24 11:15:49
Message-ID: CAGxTSnZbW4e6uFjkLEA4vBPm6Ay1Ez3RWu5h=5-KfSkLDvYK_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

hi John,

Thank you for your reply. I am in China.
You can look at my result as following:

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

So I think this CST means Central Standard Time , right? And then when I
read data using select sql, it will show this time with postgresql timezone.

2014-12-24 18:12 GMT+08:00 John R Pierce <pierce(at)hogranch(dot)com>:

> On 12/24/2014 1:54 AM, zhangyingyun001(at)gmail(dot)com wrote:
>
>> hi all, I am a new. My postgresql's version is 8.4.18. And I have
>> encounter a problem about timezone.
>> When I insert a Date value like 'Wed Dec 24 17:28:46 CST 2014' (it
>> comes from new Date() with Java), and then if you select this value , you
>> will find a big problem about time. However , If I insert this value
>> without
>> the timezone of CST, the time is normal absolutely. So I haven't idea
>> about
>> whether it is a bug. But I hope you can consider it.
>> Thank you for your time. Thanks.
>>
>
> CST is ambiguous, it can be either US Central Standard Time, or Chinese
> Standard Time.
>
> what SQL data type is the field you inserted this timestamp into, and what
> result did you get back? also, what is your local TIMEZONE setting, as
> shown by the SQL command SHOW TIMEZONE; ?
>
> --
> john r pierce 37N 122W
> somewhere on the middle of the left coast
>
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message 284466130 2014-12-24 13:21:07 BUG #12328: can't install the postgresql
Previous Message John R Pierce 2014-12-24 10:12:55 Re: BUG #12326: I think maybe postgresql has a problem about timezone.