note 32926 modified in function.date by pollita
| From: | pollita@php.net | Date: | Sat, 26 Jul 2003 17:00:40 +0000 |
| Subject: | note 32926 modified in function.date by pollita | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-52713@lists.php.net to get a copy of this message | ||
[ Editor's Note: The output of date() is dependent on the platform's implementation of
date(). Differences between the documentation and what you actually see can be attributed to such
differences. ]
Note that (in the GMT timezone at least), the output of date('T',$stamp) is actually
"GMT Standard Time" - not "GMT" as documented in the manual.
This means that you can't guarantee to be able to feed back the output of date() into
strtodate(), even if the documentation says it will produce a valid string. The workaround is to
take a substring. For example:
$s = substr(date('D, d M Y H:i:s T',$stamp),0,29);
instead of:
$s = date('D, d M Y H:i:s T',$stamp);
Jill
--was--
Note that (in the GMT timezone at least), the output of date('T',$stamp) is actually
"GMT Standard Time" - not "GMT" as documented in the manual.
This means that you can't guarantee to be able to feed back the output of date() into
strtodate(), even if the documentation says it will produce a valid string. The workaround is to
take a substring. For example:
$s = substr(date('D, d M Y H:i:s T',$stamp),0,29);
instead of:
$s = date('D, d M Y H:i:s T',$stamp);
Jill
http://www.php.net/manual/en/function.date.php