ID: 27533
Updated by: [EMAIL PROTECTED]
Reported By: scottmacvicar at ntlworld dot com
Status: Closed
Bug Type: Date/time related
Operating System: *
PHP Version: 4CVS, 5CVS (2004-03-11)
New Comment:
Works perfectly fine here with latest CVS versions of BOTH PHP 4 and
PHP 5.
Previous Comments:
------------------------------------------------------------------------
[2004-04-09 14:30:08] peter at nuvek dot com
I did some testing on a few machines I have here are the results
Broken:
#1
libc-2.3.2.so
Linux version 2.4.22-28mdk ([EMAIL PROTECTED]) (gcc
version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)) #1 Thu Feb 19 22:28:14
MST 2004
PHP 5.0.0RC1 (cli)
#2
libc-2.3.2.so
Linux version 2.4.22 (root@(none)) (gcc version 3.3) #2 SMP Tue Feb 10
02:15:52 MST 2004
PHP 5.0.0RC1 (cli)
Works:
#1
libc-2.3.2.so
Linux version 2.4.22-28mdk ([EMAIL PROTECTED]) (gcc
version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)) #1 Thu Feb 19 22:28:14
MST 2004
PHP 4.3.4 (cli)
#2
libc-2.2.4.so
Linux version 2.4.23 (root@(none)) (gcc version 2.95.3 20010315
(release)) #4 SMP Mon Dec 15 08:37:53 MST 2003
PHP 4.0.6
I hope this helps
Also of notem I have noticed that
<?php
$date1 = mktime( 0, 0, 0, 4, 1, 2001 );
$date2 = mktime( 0, 0, 0, 4, 1, 2001 ) - 1;
print date("Y-m-d H:i:s",$date1)."\n";
print date("Y-m-d H:i:s",$date2)."\n";
?>
should produce:
2001-04-01 00:00:00
2001-03-31 23:59:59
But I get:
2001-04-01 01:00:00
2001-04-01 00:59:59
With the same sucess and failure as the above example
------------------------------------------------------------------------
[2004-04-07 11:00:57] [EMAIL PROTECTED]
Please answer all questions, and additionally: which glibc do you have?
------------------------------------------------------------------------
[2004-04-07 09:38:22] peter at rukavina dot net
RedHat Enterprise Linux 3
Kernel 2.4.21-9.0.1.EL
PHP 4.3.5
------------------------------------------------------------------------
[2004-04-07 03:09:09] [EMAIL PROTECTED]
It works fine for me, what operating system is this on? And in what
timezone are you?
regards,
Derick
------------------------------------------------------------------------
[2004-04-06 17:28:05] peter at rukavina dot net
The patch doesn't seem to have solved the problem. Or perhaps it's
introduced a new one? Here's a simnple test case that calculates the
GMT timestamp using gmmktime, then echos it back using gmstrftime,
which should return the SAME time:
for ($day = 2 ; $day <= 6 ; $day++) {
$datestamp = gmmktime(1,15,0,4,$day,2004);
print gmstrftime("%Y-%m-%d %H:%M",$datestamp) . "\n";
}
Expected Result:
2004-04-02 01:15
2004-04-03 01:15
2004-04-04 01:15
2004-04-05 01:15
2004-04-06 01:15
Actual Result:
2004-04-02 01:15
2004-04-03 01:15
2004-04-04 03:15
2004-04-05 01:15
2004-04-06 01:15
This only occurs when the datestamp is between 1:00 a.m. and 1:59 a.m.
GMT on the day where DST takes effect.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27533
--
Edit this bug report at http://bugs.php.net/?id=27533&edit=1