Re: timestamps cannot be created without time zones - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: timestamps cannot be created without time zones
Date
Msg-id 200108242002.f7OK29323416@candle.pha.pa.us
Whole thread Raw
In response to Re: timestamps cannot be created without time zones  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Bruce Momjian writes:
> >> Let me see if I follow here.  If I am in the Eastern timezone and enter
> >> a time for 9pm, 1/1/1850, and someone else in the Central timezone
> >> enters the same time, if I look at the two dates from the Eastern
> >> timezone I will see mine as 9pm and the other as 10pm?
>
> > That's exactly what happens, only that the central time would probably
> > show 8pm.
>
> No, that is *not* what happens.  For dates outside the range known to
> the local platform's timezone database, we effectively assume that all
> times are given in GMT; no timezone corrections are applied on either
> input or output.  For example:

Nifty trick.  :-)

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: timestamps cannot be created without time zones
Next
From: Bruce Momjian
Date:
Subject: Re: Bug #428: Another security issue with the JDBC driver.