Is there a short way to modify DateTime to "today" but keep the previous stored time?
datetime, php
Solution
Not much better:
$newDate = new DateTime('today '.$date->format('H:i'));
Problem
There's a `DateTime`-object. I want to set it to today and keep the time. For example: - it's set to 2012-10-12 10:30:00 - it should become 2012-11-22 10:30:00 This won't work of course: ``` // this obviously changes it to 2012-11-22 00:00:00 $date->modify('today')); ``` This will work, but seems like a little much effort: ``` $clone = clone $date(); $date->modify('today')->setTime($clone->format('H'), $clone->format('i')); ``` Is there a shorter/more efficient way?