[TYPO3-mvc] datetime timezone fluid
Jan Kornblum
jan.kornblum at gmx.de
Fri Jan 16 18:02:42 CET 2015
Hi,
> Extbase queries on the date column use the same date/time as the TYPO3
> backend but when the objects are fetched from the database Extbase adds 1
> Hour. I suspect this is caused by some time zone difference but PHP, MySQL
> and TYPO3 all use the CET time zone. Does Extbase have its own time zone
> setting?
i recently had a similar problem. I had to compare a DateTime object
against a DateTime column within an repository query
(->greaterThan('DateTimeColumn', $object->DateTimeProperty)). It didn't
work correctly:
http://forum.typo3.org/index.php/t/208018/
TYPO3 backend and db queries both use UTC, but extbase respects local
timezone settings (UTC + 1 in my case) when acting with "native"
DateTime columns. This cannot match.
Finally i switched back to "classic datetime" columns (timestamp +
integer db column + DateTime property in extbase) instead of native
DateTime columns.
Kind regards, Jan
More information about the TYPO3-project-typo3v4mvc
mailing list