On 2005-10-26, Klint Gore <[EMAIL PROTECTED]> wrote: > [sorry about the previous email, I quoted the wrong bit and clicked the > wrong button] > > On Tue, 25 Oct 2005 23:41:54 -0400 (EDT), Bruce Momjian ><pgman@candle.pha.pa.us> 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?
Absolutely. > 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). > > Or have I missed something obvious? Yes. The difference between those two times is exactly the same whatever timezone the person running the query is in, because they are _completely specified_ by the input. That difference is 25 hours. There are no circumstances in which that difference could ever be 24 or 26 hours regardless of what timezone the user is in. (The only way in which the timezone makes a difference is that a user in US/Eastern might, under some circumstances, wish to regard that time period as '1 day' rather than 25 hours; no user in any other timezone would do so. Since the conversion from '25 hours' to '1 day' loses information, it should not happen.) -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly