#30096 [Asn]: gmmktime does not return the corrent time

From: Date: Wed, 15 Sep 2004 17:11:26 +0000
Subject: #30096 [Asn]: gmmktime does not return the corrent time
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-66232@lists.php.net to get a copy of this message
 ID:               30096
 User updated by:  schmidt_florian at f-24 dot com
 Reported By:      schmidt_florian at f-24 dot com
 Status:           Assigned
 Bug Type:         Date/time related
 Operating System: Linux 2.6.7 (debian unstable)
 PHP Version:      4.3.8
 Assigned To:      derick
 New Comment:

the timezone should!! be irrelevant thats the reason i use
gmmktime()... but it dont work?!


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

[2004-09-15 19:05:31] rasmus@php.net

Looks ok on my Debian laptop:

php -r 'echo phpversion()."\n"; echo gmdate("H,i,s, m,d,Y",
gmmktime(02,00,01, 03,28,2004));'
4.3.9RC2-dev
02,00,01, 03,28,2004

Since we are dealing with GMT, your timezone should be irrelevant.

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

[2004-09-15 17:18:37] derick@php.net

I'll have a look

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

[2004-09-15 16:45:24] schmidt_florian at f-24 dot com

its called debian...

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

[2004-09-15 16:43:06] schmidt_florian at f-24 dot com

Description:
------------
i have seen many bugs concerning this problem, but the latest stable
php versions (4 and 5) still dont work correct.

echo gmdate("H,i,s, m,d,Y", gmmktime(02,00,01, 03,28,2004));

expected result:                     02,00,01, 03,28,2004
result i got with v4.3.8	     03,00,01, 03,28,2004
result i got with v5.0.1	     03,00,01, 03,28,2004

so it is one hour off the wanted value.

v4.3.8 on a Linux 2.6.7 with libc6 2.3.2.ds1-13
v5.0.1 on a Linux 2.6.7-gentoo-r11 with glibc 2.3.4.20040808

timezone: CEST+DST (GMT+0200)



Reproduce code:
---------------
echo gmdate("H,i,s, m,d,Y", gmmktime(02,00,01, 03,28,2004));


Expected result:
----------------
02,00,01, 03,28,2004

Actual result:
--------------
03,00,01, 03,28,2004


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


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


Thread (10 messages)

« previous php.bugs (#66232) next »