[TYPO3-mvc] How to compare a DateTime object correctly in an Extbase query?
Jan Kornblum
jan.kornblum at gmx.de
Tue Jan 13 00:54:55 CET 2015
Hi Lienhart,
> obviously Stephan did more things with DateTime in the recent past than
> me, I didn't even know the native datetime column was supported by
> TYPO3. But in your situation I would give the old way of using integer
> timestamps a try, if they do work your problem is solved for now.
>
>
>
> What to do in the future depends. Obviously the native datetime column
> would be nice if it works, but if it causes you problems, it probably
> isn't worth the hassle.
>
after playing around this evening i can say:
Old way "integer timestamp + extbase DateTime" work very fine without
the need to modify my queries. In addition, it is quite more flexible,
too: You can use format('Y-m-d H:i:s') or format('U') or no format() at
all on the queries operand.
I don't know why native DateTime columns respect the timezone? Wouldn't
it be better not to respect the timezone automatically?
I am still interested in how my origin "native DateTime" approach could
be realized correctly ;)
Thanks for your (and stefans) help!
Kind regards, Jan
More information about the TYPO3-project-typo3v4mvc
mailing list