Re: strange behaviour with strtotime()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------------------------------------

try that:
echo "strtotime1:".strtotime ("next Month")."\n";
echo "strtotime2:".strtotime ("next month")."\n";
echo "time:".time()."\n";
echo "time1:".strftime("%d %m %Y",strtotime("next Month"))." | time2:".strftime("%d %m %Y",time());

(probably causing error because of "m"onth / "M"onth;

Post result please.

i get:
strtotime1:1143801588
strtotime2:1143801588
time:1138707588
time1:31 03 2006 | time2:31 01 2006


thats indeed funny O_o
--
Smileys rule (cX.x)C --o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux