Hi internals,

I would to modify a \DateTime object to the current time, thus I wrote this:

$d = new \DateTime('+1 hour');
$d->modify('now');

It did not work. Why? Because the documentation (http://php.net/datetime.formats.relative) says: “Now - this is simply ignored”. Really? But the behavior is pretty straightforward isn't? “modify to now” means “set to the current date and time and let the timezone unchanged”.

Thoughts?
Best regards.

--
Ivan Enderlin
Developer of Hoa
http://hoa.42/ or http://hoa-project.net/

PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis)
http://disc.univ-fcomte.fr/ and http://www.inria.fr/

Member of HTML and WebApps Working Group of W3C
http://w3.org/



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to