[wp-hackers] Re: Sqlite

Robert Deaton false.hopes at gmail.com
Sat Jun 25 12:20:26 GMT 2005


I've also looked into implementing DST support for projects in the
past and realized there is no sure fire way to do it across platforms
and the best bet is to rely on the user knowing their offset. Sure,
minutes should be added, but adding automatic detection of DST and
appropriate changes to DST would be more of a hassle then its worth.

On 6/25/05, Peter Westwood <peter.westwood at ftwr.co.uk> wrote:
> 
> On Fri, June 24, 2005 8:37 pm, David Chait said:
> > Ahhh, okay, there are two completely different threads going on here.
> >
> > One was about storing as unix timestamps instead of mysql DATETIME.  The
> > other, apparently, was about storing the timezone offset at time of post
> > rather than the gmt timestamp at time of post.
> >
> > For the former, I'm all for it.  Go to timestamps, nix DATETIME, makes it
> > easier for alternate DB systems.
> >
> > For the latter, I can't say I care much either way.  A gmt offset is only 24
> > values (okay, 48 if you want half-hours), which is under a single byte.  A
> > timestamp is at least a 4-byte value.  I don't know that saving three bytes
> > per post makes any difference versus the constant recalc time, so I'm
> > probably with mr. house on this one.  SO, just store a gmt unix timestamp as
> > well!  All done? ;)
> >
> 
> Assuming that the GMT offset is a integer number of hours or half hours is unfortunately not possible.  The are a few
> countries/regions with x:45 or x:15 offsets and it is quite possible that a country could legislate towards a
> completely different offset if they so wished so we probably need to store the number of minutes to be safe.
> 
> If we are going to improve the storage of GMT offset then we probably need to improve/implement proper support for DST
> because we can't assume that we can rely on the underlying system - however implementing full DST support can become a
> nightmare (We have recently looked into this for work and I can dig up some references next week if any one is
> interested)
> 
> westi
> --
> Peter Westwood
> Blog: http://www.ftwr.co.uk/blog/
> Get Firefox: http://www.spreadfirefox.com/?q=affiliates&id=20287
> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 


-- 
--Robert Deaton
http://somethingunpredictable.com


More information about the wp-hackers mailing list