How does one get strtotime() real NOW now that the function behaves according to GNU date syntax?

From: Date: Tue, 15 Jun 2004 10:02:44 +0000
Subject: How does one get strtotime() real NOW now that the function behaves according to GNU date syntax?
Groups: php.general 
Request: Send a blank email to php-general+get-188307@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi All, Now that the strtotime() function behaves in according to GNU date syntax (which i feel should not have changed in a minor php version bump but thats a different issue) how does one implement something like the old system? Lets say, for example, that i want to get the timestamp for 2 seconds in the future, before i could have just done: $t = strtotime('NOW + 2 seconds'); But since the change this will no longer work as you will get the correct day but with a time of 00:00:02. I have tried the following but this fails and results in -1: $t = strtotime('@'.time().' + 2 seconds') p.s. I know that for the example posted i could just do: $t = time() +2 But i also want situations where i could have 'next thursday + 3 hours' etc. - -- Regards, William Bailey. Pro-Net Internet Services Ltd. http://www.pro-net.co.uk/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAzslDzSfrYDJMXmERAqS2AJ4obr0gKSuarYLPvk8pC+abGeG+ywCfV1lj Q24x2yOTjPzWG+rILSQD/CA= =EIr6 -----END PGP SIGNATURE-----

« previous php.general (#188307) next »