[FLOW3-general] DateTime limited to Unix timestamp?
Michael Sauter
mail at michaelsauter.net
Thu Jul 1 18:01:01 CEST 2010
On 01.07.10 14:00, Jigal van Hemert wrote:
> If I read it correctly, FLOW3 still uses the Unix timestamp to store
> dates. Wouldn't this be a good opportunity to move to a 64-bit format?
>
> The code already uses the PHP DateTime class and even though that
> contains an (old) bug which limits the years to +/- 10,000 this would
> mean a big step forward.
>
> It would be great to be able to store dates before 1901 and after 2038,
> wouldn't it?
Hi Jigal,
I had a look at date & time in PHP recently and think the best way of
doing it is the way FLOW3 handles it.
If I'm not mistaken, the unix timestamp is only limited to 2038 on
32-bit systems, not on 64-bit. And here's hope there won't be any 32-bit
systems around in 28 years ;) For more detail on this see my blogpost
about it:
http://michaelsauter.net/blog/2010/04/15/travelling-through-date-and-time-part-i/
And 64-bit integers will definitly survive FLOW3 ;)
AFAIK, FLOW3 only converts the DateTime objects when persisting it. I
guess this is also done in order to store date/time in different
databases, cause every database is able to store integers.
There's still the problem with dates before 1970 (not 1901) though ...
~michael
More information about the FLOW3-general
mailing list