pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14182: Wrong time stamp exactly at 1996 hour 3
3+ messages / 2 participants
[nested] [flat]

* BUG #14182: Wrong time stamp exactly at 1996 hour 3
@ 2016-06-08 20:37  olmozavala@gmail.com
  0 siblings, 1 reply; 3+ messages in thread

From: olmozavala@gmail.com @ 2016-06-08 20:37 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14182
Logged by:          Olmo Zavala
Email address:      olmozavala@gmail.com
PostgreSQL version: 9.4.6
Operating system:   Ubuntu 16.04
Description:        

If you create a table with just id and mydate (timestamp without zone) and
then you execute:

INSERT INTO test (fecha) VALUES
(to_timestamp('07/04/1996/2','DD/MM/YY/HH24'))
INSERT INTO test (fecha) VALUES
(to_timestamp('07/04/1996/3','DD/MM/YY/HH24'))

It should give you two different hours, but it will give you the same hour.
I was filling a very large database and this problem seems to appear only at
this specific date and time. 


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #14182: Wrong time stamp exactly at 1996 hour 3
@ 2016-06-08 21:39  John R Pierce <pierce@hogranch.com>
  parent: olmozavala@gmail.com
  0 siblings, 1 reply; 3+ messages in thread

From: John R Pierce @ 2016-06-08 21:39 UTC (permalink / raw)
  To: olmozavala@gmail.com; pgsql-bugs

On 6/8/2016 1:37 PM, olmozavala@gmail.com wrote:
> If you create a table with just id and mydate (timestamp without zone) and
> then you execute:
>
> INSERT INTO test (fecha) VALUES
> (to_timestamp('07/04/1996/2','DD/MM/YY/HH24'))
> INSERT INTO test (fecha) VALUES
> (to_timestamp('07/04/1996/3','DD/MM/YY/HH24'))
>
> It should give you two different hours, but it will give you the same hour.
> I was filling a very large database and this problem seems to appear only at
> this specific date and time.

that date/time is exactly when DST began that year in the USA... The 
function to_timestamp returns a timestamptz (timestamp with time zone).

-- 
john r pierce, recycling bits in santa cruz



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #14182: Wrong time stamp exactly at 1996 hour 3
@ 2016-06-08 21:50  John R Pierce <pierce@hogranch.com>
  parent: John R Pierce <pierce@hogranch.com>
  0 siblings, 0 replies; 3+ messages in thread

From: John R Pierce @ 2016-06-08 21:50 UTC (permalink / raw)
  To: Olmo Zavala Romero <olmozavala@gmail.com>; +Cc: pgsql-bugs

On 6/8/2016 2:48 PM, Olmo Zavala Romero wrote:
> Is there a function that do not take into account the time zone?
> I have defined my variable as "timestamp WITHOUT TIME ZONE" and my 
> original data do NOT have DST so how can I add this into my database.

set your client timezone to UTC


-- 
john r pierce, recycling bits in santa cruz



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2016-06-08 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-06-08 20:37 BUG #14182: Wrong time stamp exactly at 1996 hour 3 olmozavala@gmail.com
2016-06-08 21:39 ` John R Pierce <pierce@hogranch.com>
2016-06-08 21:50   ` John R Pierce <pierce@hogranch.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox