#42786 [NEW]: Unclear paragraph in strtotime()
| From: | yoavf at imagineersystems dot com | Date: | Fri, 28 Sep 2007 10:34:50 +0000 |
| Subject: | #42786 [NEW]: Unclear paragraph in strtotime() | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-45@lists.php.net to get a copy of this message | ||
From: yoavf at imagineersystems dot com
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Unclear paragraph in strtotime()
Description:
------------
The documentation for strtotime is slightly confusing/run-on...
---
The function expects to be given a string containing a US English date
format and will try to parse that format into a Unix timestamp (the number
of seconds since January 1 1970 00:00:00 GMT), relative to the timestamp
given in now, or the current time if none is supplied.
---
At first glance, the paragraph appears to imply "The function [returns]
the current time if none is supplied."
Reproduce code:
---------------
The function expects to be given a string containing a US English date
format and will try to parse that format into a Unix timestamp (the number
of seconds since January 1 1970 00:00:00 GMT), relative to the timestamp
given in now, or the current time if none is supplied.
Expected result:
----------------
The function expects to be given a string containing a US English date
format and will try to parse that format into a Unix timestamp (the number
of seconds since January 1 1970 00:00:00 GMT), relative to the timestamp
given in now, or the current time if none is supplied.
Actual result:
--------------
The function expects to be given a string containing a US English date
format and will try to parse that format into a Unix timestamp (the number
of seconds since January 1 1970 00:00:00 GMT). This is relative to the
timestamp given in $now, or the current time if $now is not
supplied/null/false.
--
Edit bug report at http://bugs.php.net/?id=42786&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42786&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42786&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42786&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42786&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42786&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42786&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42786&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42786&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42786&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42786&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42786&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42786&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42786&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42786&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42786&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42786&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42786&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42786&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42786&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42786&r=mysqlcfg