[TYPO3-mvc] Native DateTime properties not supported by DataMapper
Nicolas de Haen
typo3 at ndh-websolutions.de
Tue Dec 18 07:48:14 CET 2012
Hi,
I just added the new native DateTime and Date support into the
ExtensionBuilder and ran into problems with the DataMapper.
It seems the mapDateTime method is only capable to convert timestamps
but not strings like '21-12-2012' or '21-12-2012 00:00:01'.
I wanted to provide a patch but then I saw that there is another issue
related to DateTime/DataMapper http://forge.typo3.org/issues/9087 which
is on hold since 5 month.
Is there any plan or strategy how to solve this?
Would it make sense just to patch the method for now, ignoring the other
issue?
It's just a 2 line patch:
elseif(is_string($timestamp) && strtotime($timestamp) !== FALSE) {
$timestamp = strtotime($timestamp);
}
regards,
Nico
btw: do we really have not a single DataMapper unit test at the moment?
--
Nico de Haen
ndh websolutions
Webprogrammierung, OpenSource, Typo3
http://www.ndh-websolutions.de
More information about the TYPO3-project-typo3v4mvc
mailing list