ID:          26793
 Comment by:  chris at free-source dot com
 Reported By: kulakov74 at yandex dot ru
 Status:      Open
 Bug Type:    Documentation problem
 PHP Version: Irrelevant
 New Comment:

Also on the strtotime page the link to the GNU utils man page is dead.


Previous Comments:
------------------------------------------------------------------------

[2004-01-05 08:22:28] kulakov74 at yandex dot ru

Description:
------------
I think strtotime() and probably the more general "Date and Time
Functions" chapter need these additions:

1. Daylight Savings Time stuff should be explained; it should be
clearly stated that one can't do integer arithmetics right with
timestamps because of DST. At least strtotime() handles this correctly
(another option is maketime()), so it should be used whenever, say, we
need to add 7 days to a date as in strtotime('+7 days', $Date),
while this is wrong: $Date+=7*24*3600. 
This will prevent a lot of developers new to the date&time issue from
stumbling over the problem and reporting another "bug" answered with a
congratulation on DST discovery. 

2. Descriptions of all the formats for the "time" parameter in
strtotime() should be included in the PHP documentation itself;
providing just a link to GNU Tar Date formats does not necessarily
leads to following the link and therefore leads to misunderstanding of
the "time" parameter formats, hence to another wave of "bug" reports
about "next [weekday]" unexpected behavour. 

Reproduce code:
---------------
Current (online) strtotime() documentation

Expected result:
----------------
I think people should be able to know what strtotime() will return and
avoid the described pitfalls when they have read the PHP docs alone



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26793&edit=1

Reply via email to