From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.2.3
PHP Bug Type:     Date/time related
Bug description:  Remove is_dst parameter from gmmktime?

Passing anything but -1 for the is_dst argument of gmmktime can result in
times that are off by an hour, if the system's local time zone uses DST.
For example, I assumed that passing 0 would the right thing to do (not in
DST), but if the date falls within my local DST range, the time I get back
is an hour ahead. This is because, internally, PHP calls mktime and then
tries to adjust the local time to GMT.

Of course, this is easy enough to work around, and I will put a note on
the manual page, but I still think the parameter is irrelevant for
gmmktime, and since its use can cause errors, it would be nice if it were
removed, or at least ignored (if one wants to avoid breaking existing
code; although a warning would probably be good).


/* Demostrate problem with gmmktime() */
// These should produce the same value, as GMT has no DST.
echo gmmktime(0, 0, 0, 7, 23, 2002, 0) ."\n";
echo gmmktime(0, 0, 0, 7, 23, 2002) . "\n";

-- 
Edit bug report at http://bugs.php.net/?id=19583&edit=1
-- 
Try a CVS snapshot:  http://bugs.php.net/fix.php?id=19583&r=trysnapshot
Fixed in CVS:        http://bugs.php.net/fix.php?id=19583&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=19583&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=19583&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=19583&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19583&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=19583&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=19583&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=19583&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=19583&r=globals

Reply via email to