[wp-hackers] Internal representation of time

Alex Günsche ag.ml2008 at zirona.com
Fri Mar 14 14:41:37 GMT 2008


On Fri, 2008-03-14 at 15:30 +0100, Alex Günsche wrote:
> On Fri, 2008-03-14 at 14:19 +0000, James Davis wrote:
> > The range of dates which can be represented by Unix timestamps 
> > (1901-12-13 to 2038-01-18) is a small subset of the range of dates which 
> > can be represented by MySQL DATETIME (1000-01-01 to 9999-12-31).
> > 
> > At the moment entering a date outside of Unix timestamp range results in 
> > the correct date being stored (sometimes!) in the database but presented 
> > as 1970-01-01 to the user.
> 
> Little correction: Unix timestamps are always defined as the seconds
> elapsed since 1970-01-01.

Well, I just learnt that Unix timestamps can also be expressed as
negative integers, so indeed they can express times before 1970. How
educational it can be to participate in a ML. :)

Thanks, for the discreet e-mail, Aaron. ;) And, sorry, James.

Alex

-- 
Alex Günsche, Zirona OpenSource-Consulting
Blogs: http://www.zirona.com/ | http://www.regularimpressions.net
*** Want to test the shiny new release of InstantUpgrade? ***
http://www.zirona.com/blog/software/instantupgrade-10-beta/



More information about the wp-hackers mailing list