PHP 4.0 Bug #10145: strtime("") result?
| From: | colin at easydns dot com | Date: | Tue, 03 Apr 2001 19:57:26 +0000 |
| Subject: | PHP 4.0 Bug #10145: strtime("") result? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-50739@lists.php.net to get a copy of this message | ||
From: colin@easydns.com
Operating system: RH 7.0
PHP version: 4.0 Latest CVS (03/04/2001)
PHP Bug Type: Date/time related
Bug description: strtime("") result?
strtotime("") returns the timestamp for midnight on the current date.
I suppose if you think about it a bit, it makes sense (since the modification you are making to the
current date is empty), but I would suggest that it should return either a warning or nothing.
A lot of people (judging from the manual notes) use strtotime() to parse an existing date string,
not to do a "+30 days" modification to it. For them, the strtotime("") result
is not intuitive, I think.
Perhaps the confusion could be fixed by having one function to parse date/time strings and one to do
the "+X days" modification?
--
Edit Bug report at: http://bugs.php.net/?id=10145&edit=1