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

Re: BUG #1993: Adding/subtracting negative time intervals

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Michael Fuhr <mike(at)fuhr(dot)org>,Michael Glaesemann <grzm(at)myrealbox(dot)com>,Russell Smith <mr-russ(at)pws(dot)com(dot)au>, pgsql-bugs(at)postgresql(dot)org,Nicholas <hb(at)x256(dot)com>
Subject: Re: BUG #1993: Adding/subtracting negative time intervals
Date: 2005-10-26 12:31:41
Message-ID: 200510261231.j9QCVfs14622@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
John R Pierce wrote:
> >>	test=> select
> >>	test-> ('2005-10-30 13:22:00-05'::timestamptz -
> >>	test(>  '2005-10-29 13:22:00-04'::timestamptz);
> >>	 ?column?
> >>	----------
> >>	 25:00:00
> >>	(1 row)
> > 
> > 
> > Is that actually the correct answer?
> > 
> > Disregarding daylight savings, there is 25hrs between them.  Once
> > daylight savings is taken into account there should be 24 or 26 hours
> > between them (southern/northern hemisphere respectively).
> 
> the whole DST thing falls apart when you deal with places that don't 
> respect it...  arizona (except the navajo nation), for instance....
> 
> it would be impossible to calculate the 'correct' answer without knowing 
> the exact location...

Yes, I ran this in EST5EDT time, so the answer is correct for that
timezone.

-- 
  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

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2005-10-26 12:52:55
Subject: Re: PQescapeIdentifier
Previous:From: Andrew - SupernewsDate: 2005-10-26 07:32:57
Subject: Re: BUG #1993: Adding/subtracting negative time intervals

pgsql-bugs by date

Next:From: Ludmil TinkovDate: 2005-10-26 12:47:47
Subject: Re: BUG #1996: DISTINCT fails with national character varying
Previous:From: Telin LinDate: 2005-10-26 08:27:52
Subject: BUG #2001: Signal 11 after concurrent inserts + updates

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