[FLOW3-general] DateTime limited to Unix timestamp?
Karsten Dambekalns
karsten at typo3.org
Thu Jul 15 16:38:22 CEST 2010
Hi.
On Thu, 01 Jul 2010 14:00:12 +0200, Jigal van Hemert <jigal at xs4all.nl>
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?
Yes, we use getTimestamp() and setTimestamp() currently on the DateTime
objects. That was the way of least resistance.
As has been pointed out, the timestamp itself is not the problem, rather
the range in which it is stored. We could switch to something better here,
and probably will do in later, optimized backends. Currently the PDO
backend with the scope of "pure ANSI SQL" cannot handle dates any better,
at least that was my conclusion. Integers allow range queries on any
database, timestamp can be set and retrieved reliably from DateTime, and
we don't need any fancy type handling in the DB layer right now.
I'm all in for optimizing this, but currently we didn't have further
needs. As soon as start/end come into play for TYPO3 Phoenix that will
probably change. :)
If anyone compiles a list of date handling ways for various RDBMSs and a
really good way to get/set something like DateTime::ISO8601 on DateTime
objects regardless of the format the DB delivers I'd be happy. Talking
about it, there was a lot of trouble in the way DateTimeZone and DateTime
worked together, IIRC.
Anyway, not being entirely happy with the current solution I am definitely
open for something better! DateTime handling experts to the rescue!
Regards,
Karsten
More information about the FLOW3-general
mailing list