|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-07-31 07:55 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Mar 25 17:00:01 2026 UTC |
Description: ------------ strftime -- strtotime Reproduce code: --------------- --- From manual page: function.strftime --- <?php date_default_timezone_set('PRC'); $str1 = "07/31/2009 12:00:00 AM"; $t1 = strtotime($str1); var_dump($t1); echo "\nt1: ".strftime("%I:%M:%S %p", $t1); echo "\nt1: ".strftime("%H:%M:%S", $t1); echo "\n ".date('m/d/Y H:i:s', $t1); ?> Expected result: ---------------- t1: 12:00:00 AM t1: 12:00:00 07/31/2009 12:00:00 Actual result: -------------- int(1248969600) t1: 12:00:00 AM t1: 00:00:00 07/31/2009 00:00:00