[TYPO3-mvc] Re: No Query-Result with two DateTime comparisons
Philipp Wrann
philippwrann at gmail.com
Thu Aug 28 12:46:20 CEST 2014
When modifying an object you alter the original.
So when doing
$endtime = $starttime;
$starttime = $endtime->modify('P3D');
both dates till be the same
You could use clone
$endtime = clone $starttime;
$endtime->modify('P3D');
Then you have 2 independent datetime objects
or you do:
$starttime = \DateTime::createFromFormat($format, $starttimestring);
$endtime = \DateTime::createFromFormat($format,$endtimestring);
More information about the TYPO3-project-typo3v4mvc
mailing list