note 98878 added to function.strtotime

From: Date: Tue, 13 Jul 2010 15:59:07 +0000
Subject: note 98878 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-170877@lists.php.net to get a copy of this message
Take Care: strtotime() may not add months properly. The out put may not be as expected. <?php echo '<br />'.date("Y-m-d", strtotime('+1 month', mktime(0,0,0,1,31,2010))); ?> PHP Output - 2010-03-03 (Version 5.3.2) (Not Expected) MySQL Output while adding 1 month to 2010-01-31 will be 2010-02-28 (As Expeced) ---- Server IP: 69.147.83.197 Probable Submitter: 219.64.202.18 ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- https://master.php.net/note/edit/98878 Del: integrated -- https://master.php.net/note/delete/98878/integrated Del: useless -- https://master.php.net/note/delete/98878/useless Del: bad code -- https://master.php.net/note/delete/98878/bad+code Del: spam -- https://master.php.net/note/delete/98878/spam Del: non-english -- https://master.php.net/note/delete/98878/non-english Del: in docs -- https://master.php.net/note/delete/98878/in+docs Del: other reasons-- https://master.php.net/note/delete/98878 Reject -- https://master.php.net/note/reject/98878 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#170877) next »