note 59913 added to function.strftime

From: Date: Tue, 20 Dec 2005 00:29:20 +0000
Subject: note 59913 added to function.strftime
Groups: php.notes 
Request: Send a blank email to php-notes+get-100441@lists.php.net to get a copy of this message
To correct an error in the above list of formatting codes: %p - either AM' or PM' according to the given time value, or the corresponding strings for the current locale (note result is in capitals) %P - either am' or pm' according to the given time value, or the corresponding strings for the current locale (note result is in lower case) In addition, the following codes seem to return a value on my system (Linux, Apache/1.3.33, PHP/4.4.1), but are not documented above. I have included the result given by passing them to gmstrftime() with a timestamp of 0 (unix epoch). gmstrftime() was used to avoid timezone/DST differences. %F: "1970-01-01" (appears to be an SQL-formatted version of the date) %k: "0" (seems to be the hour in 24-hour clock, without leading zeros (space-padded)) %l: "12" (seems to be the hour in 12-hour clock, without leading zeros (space-padded)) %s: "-3600" %s seems to be the Unix timestamp passed to the function, but somehow based on the current locale/TZ settings (even in gmstrftime()). On my system strftime("%H:%M:%S", 0) returns "01:00:00", and strftime("%s", 0) returns "0". Using gmstrftime() I get "00:00:00" and "-3600" respectively. ---- Manual Page -- http://www.php.net/manual/en/function.strftime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59913 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59913&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59913&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59913&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59913&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59913&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59913&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59913&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59913&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#100441) next »