Re: strange behaviour with strtotime()

From: Date: Tue, 31 Jan 2006 11:50:21 +0000
Subject: Re: strange behaviour with strtotime()
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-229525@lists.php.net to get a copy of this message
Barry wrote:
James Benson wrote:
Im encountering some very weird behaviour when using the following:- echo date("M", strtotime("next month")); outputs: Mar while echo date("r",time()); outputs: Tue, 31 Jan 2006 11:21:47 +0000 anyone know why? ---------------------------------------------------------
Master CIW Designer          http://www.ciwcertified.com
Zend Certified Engineer      http://www.zend.com
http://www.jamesbenson.co.uk ---------------------------------------------------------
Probably know why now. The strtotime function adds the value of "one month" to the actual unix time and causing therefor an error.
Most funny party is, if you add "+1 Month" and "+2 Month" you get the 3.3 and the 31.3. I would say this is a bug! ^_^ Report it :) -- Smileys rule (cX.x)C --o(^_^o)

« previous php.general (#229525) next »