note 59913 deleted from function.strftime by danbrown

From: Date: Sat, 07 Feb 2009 01:21:45 +0000
Subject: note 59913 deleted from function.strftime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-150345@lists.php.net to get a copy of this message
Note Submitter: php at REMOVEMEkennel17 dot co dot uk ---- 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.

« previous php.notes (#150345) next »