note 90359 deleted from function.strptime by danbrown

From: Date: Fri, 17 Apr 2009 16:37:23 +0000
Subject: note 90359 deleted from function.strptime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-153445@lists.php.net to get a copy of this message
Note Submitter: dead dot screamer at seznam dot cz ---- 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)

« previous php.notes (#153445) next »