Search Postgresql Archives

Re: Storage sizes for dates/times (documentation bug?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 15, 2008 at 06:48:27AM -0700, Adrian Klaver wrote:
> On Tuesday 15 April 2008 6:31 am, Sam Mason wrote:
> > My reasoning goes something like this:  The WITH and WITHOUT clauses
> > seem to be the opposite of my naive understanding of their purpose.  I'd
> > think that if you specify WITH TIME ZONE then it means that the timezone
> > is important to me, and I want to deal with it myself.  Whereas, the
> > WITHOUT TIME ZONE clause would suggest that the timezone isn't important
> > to me, and anything the database can do to make the problem go away the
> > better.  What the spec says, and PG does, is actually the opposite.  The
> > fact that this confusion can occur (and seems to occur reasonably often
> > based on previous posts to the mailing lists) suggests that the docs
> > should highlight the differences more clearly.
> >
> > I'd also hazard a guess that we don't hear about it more because most
> > people just work within a single time zone and hence don't even notice
> > the difference between the two.
> 
> My only comment is on this assertion. Any location that has DST rules has two 
> time zones.  For instance I live in  US PST/PDT.  Without timezone support 
> doing date/time math across time zone boundaries is asking for problems. 

Yes, knowing the difference between the two variants is needed to write
correct code.

In practise I'd guess that people don't do much testing across DST
changes and if they do the calcs are generally on the order of days
so an hour probably doesn't go amiss.  The code will do all the right
things for them, but yes, it isn't correct.


  Sam


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux