[TYPO3-mvc] Native DateTime properties not supported by DataMapper
Anja Leichsenring
aleichsenring at ab-softlab.de
Tue Dec 18 08:01:28 CET 2012
Hi Nico,
thanks for your work on this.
I think we should close the other issue (will have a closer look to this
later the day) and start fresh with your patch on the whole DateTime
support.
Sadly, but true, there are no unit tests for the DataMapper, so perhaps
you write the first one with your patch?
Greetings Anja
Am 18.12.2012 07:48, schrieb Nicolas de Haen:
> 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?
>
More information about the TYPO3-project-typo3v4mvc
mailing list