note 90359 added to function.strptime

From: Date: Fri, 17 Apr 2009 16:36:07 +0000
Subject: note 90359 added to function.strptime
Groups: php.notes 
Request: Send a blank email to php-notes+get-153444@lists.php.net to get a copy of this message
On some platforms strptime() returns very odd results, if in input data dasn't some parts (time to example): <?php var_Dump(strptime('17/02/2009','%d/%m/%Y')); ?> result: array(9) { ["tm_sec"]=> int(8) ["tm_min"]=> int(163092600) ["tm_hour"]=> int(-1078038232) ["tm_mday"]=> int(17) ["tm_mon"]=> int(1) ["tm_year"]=> int(109) ["tm_wday"]=> int(2) ["tm_yday"]=> int(47) ["unparsed"]=> string(0) "" } Date is correct, but time is random or incorrect. Platform: PHP Version 5.1.6 Apache/2.2.3 (CentOS) ---- Server IP: 212.24.129.51 Probable Submitter: 82.142.89.49 ---- Manual Page -- http://www.php.net/manual/en/function.strptime.php Edit -- https://master.php.net/note/edit/90359 Del: integrated -- https://master.php.net/note/delete/90359/integrated Del: useless -- https://master.php.net/note/delete/90359/useless Del: bad code -- https://master.php.net/note/delete/90359/bad+code Del: spam -- https://master.php.net/note/delete/90359/spam Del: non-english -- https://master.php.net/note/delete/90359/non-english Del: in docs -- https://master.php.net/note/delete/90359/in+docs Del: other reasons-- https://master.php.net/note/delete/90359 Reject -- https://master.php.net/note/reject/90359 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#153444) next »