#27719 [NEW]: mktime returns incorrect timestamp for dst days
| From: | schmidt dot a at rogers dot com | Date: | Fri, 26 Mar 2004 16:27:42 +0000 |
| Subject: | #27719 [NEW]: mktime returns incorrect timestamp for dst days | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-56891@lists.php.net to get a copy of this message | ||
From: schmidt dot a at rogers dot com
Operating system: FreeBSD 4.4
PHP version: 5.0.0RC1
PHP Bug Type: Date/time related
Bug description: mktime returns incorrect timestamp for dst days
Description:
------------
As of php 5.0RC1 mktime returns a negative value when supplied with a date
on daylight savings regardless of the is_dst option.
This did not occur in php 5 beta 3, nor in any version of php 4.
Reproduce code:
---------------
echo mktime(0, 0, 0, 4, 4, 2004, 0) . "\n";
echo mktime(0, 0, 0, 4, 4, 2004, 1) . "\n";
echo mktime(0, 0, 0, 4, 4, 2004, -1) . "\n";
Expected result:
----------------
with php 5 beta 3 and php 4:
1081054800
1081051200
1081054800
Actual result:
--------------
with php 5 RC1:
-7262
-7262
-7262
--
Edit bug report at http://bugs.php.net/?id=27719&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27719&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27719&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27719&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27719&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27719&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27719&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27719&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27719&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27719&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27719&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27719&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27719&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27719&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27719&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27719&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27719&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27719&r=float