Re: BUG #12326: I think maybe postgresql has a problem about timezone. - Mailing list pgsql-bugs

From 张亚琪
Subject Re: BUG #12326: I think maybe postgresql has a problem about timezone.
Date
Msg-id CAGxTSnZbW4e6uFjkLEA4vBPm6Ay1Ez3RWu5h=5-KfSkLDvYK_A@mail.gmail.com
Whole thread Raw
In response to Re: BUG #12326: I think maybe postgresql has a problem about timezone.  (John R Pierce <pierce@hogranch.com>)
Responses Re: BUG #12326: I think maybe postgresql has a problem about timezone.
Re: BUG #12326: I think maybe postgresql has a problem about timezone.
List 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@hogranch.com>:
On 12/24/2014 1:54 AM, zhangyingyun001@gmail.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


pgsql-bugs by date:

Previous
From: John R Pierce
Date:
Subject: Re: BUG #12326: I think maybe postgresql has a problem about timezone.
Next
From: Jeff Janes
Date:
Subject: Re: BUG #12326: I think maybe postgresql has a problem about timezone.