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

Re: abstime bug

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: jw <jw(at)sduept(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: abstime bug
Date: 2005-07-22 14:44:03
Message-ID: 200507221444.j6MEi3M11313@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Michael Fuhr wrote:
> On Fri, Jul 22, 2005 at 10:15:40AM -0400, Bruce Momjian wrote:
> > 
> > Current CVS shows:
> > 
> > 	test=> select '1901/12/14 1:00'::abstime;
> > 	        abstime
> > 	------------------------
> > 	 1901-12-14 01:00:00-05
> > 	(1 row)
> 
> Depends on your timezone:
> 
> SET TimeZone TO 'US/Eastern';
> SELECT '1901/12/14 1:00'::abstime;
>         abstime         
> ------------------------
>  1901-12-14 01:00:00-05
> (1 row)
> 
> SET TimeZone TO 'Asia/Hong_Kong';
> SELECT '1901/12/14 1:00'::abstime;
>         abstime         
> ------------------------
>  2038-01-19 07:51:40+08
> (1 row)
> 
> I'd guess this is due to the 32-bitness of abstime.  Those timestamps
> are around the min and max values of a 32-bit timestamp based on the
> traditional Unix epoch.

Yea, I see the same thing in 8.0.X.  I don't think abstime should be
used in that date range, timestamp is a better solution.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-bugs by date

Next:From: Dave ChapeskieDate: 2005-07-22 15:41:04
Subject: Re: BUG #1723: array_cat() bug when passed empty array
Previous:From: Michael FuhrDate: 2005-07-22 14:33:02
Subject: Re: abstime bug

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