Skip site navigation (1) Skip section navigation (2)

timestamp problem

From: "Wright, George" <George(dot)Wright(at)infimatic(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: timestamp problem
Date: 2007-10-31 14:07:52
Message-ID: 51548D6D5BEB57468163194A8C1A0E9831954D@MAGPTCPEXC02.na.mag-ias.net (view raw or flat)
Thread:
Lists: pgsql-novice
I seem to be getting an incorrect result from the isfinite postgresql
call when querying an invalid time in the DST change.

 

The OS is Suse 10.2, timezone files have been updated with the files in
tzdata2007h.tar.gz.

 

This shows proper installation of the timezone files:

myhost:/ # zdump -v Brazil/East | grep 2007

Brazil/East  Sun Feb 25 01:59:59 2007 UTC = Sat Feb 24 23:59:59 2007
BRST isdst=1 gmtoff=-7200

Brazil/East  Sun Feb 25 02:00:00 2007 UTC = Sat Feb 24 23:00:00 2007 BRT
isdst=0 gmtoff=-10800

Brazil/East  Sun Oct 14 02:59:59 2007 UTC = Sat Oct 13 23:59:59 2007 BRT
isdst=0 gmtoff=-10800

Brazil/East  Sun Oct 14 03:00:00 2007 UTC = Sun Oct 14 01:00:00 2007
BRST isdst=1 gmtoff=-7200

 

The settings on the box are Brazil East. The hour of 2007-10-14 00:00:00
to 2007-10-14 00:59:59 does not exist. In that part of Brazil they move
the clock from midnight to 1am as they step forward into DST.

 

myhost=> select isfinite(timestamp '2007-10-14 00:00:00 BRST');

 isfinite 

----------

 t

(1 row)

 

Changing to standard time returns the same result:

 

myhost=> select isfinite(timestamp '2007-10-14 00:00:00 BST'); 

 isfinite 

----------

 t

(1 row)

 

This should fail as it does for something like:

 

badger=> select isfinite(date '2007-10-14 24:00:01');

ERROR:  date/time field value out of range: "2007-10-14 24:00:01"

 

Did I miss something?

 

 

In response to

Responses

pgsql-novice by date

Next:From: Michael GlaesemannDate: 2007-10-31 15:11:19
Subject: Re: timestamp problem
Previous:From: Durgaprasad PawarDate: 2007-10-30 17:00:04
Subject: Re: Problem with createdb

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group