From:             akorthaus at web dot de
Operating system: RedHat-Linux 7.3, kernel 2.4.20
PHP version:      4.3.2
PHP Bug Type:     Date/time related
Bug description:  all timefunctions don't give back correct time

Description:
------------
Hi!

Now I'm trying to solve this problem for more then 10 houres,  nad nobody
seems to know what is going wrong here. If I try this:

<?php
echo date("H:i:s")."\n";
echo gmdate("H:i:s");
?>

That displays:
12:36:36
11:36:36

What I would expect would be the same like date in shell:
# date
Fri Jul 11 13:37:39 CEST 2003

the correspondent Apache access-log:
[11/Jul/2003:12:36:36 +0100]

# /sbin/hwclock
returns 
Fri 11 Jul 2003 13:36:42 PM CEST  0.707042 seconds

and it could not be set by
# /sbin/hwclock --systohc --utc
but I think thats not important

# ls -l /etc/localtime
lrwxrwxrwx    1 root     root           33 Jul 11 09:33 /etc/localtime ->
/usr/share/zoneinfo/Europe/Berlin

which is what I want(my timezone). It's GMT + 1. PHP _has_ these
difference of one hour between time() and gmtime(), but both are an extra
hour too late.

I also restartet Apache, I tried to change /etc/sysconfig/clock, which is
now:

# cat /etc/sysconfig/clock
ZONE="Europe/Berlin"
UTC=true
ARC=false

But PHP did not take care about changes in it, PHP also did not care about
changing my timezone, this 1 hour too late stays.

also ntpdate did not help, the time was changed about 3 seconds.

Im Using RedHat Linux 7.3 min.-Installation
I compiled Apache 1.3.27 with PHP 4.3.2 as static module.

My PHP-./configure:
./configure --with-apache=../apache_1.3.27 --with-mysql --with-gd
--with-jpeg-dir=/usr --with-png-dir=/usr --with-ttf --with-zlib
--enable-gd-native-ttf --enable-trans-sid --disable-cgi --enable-ftp

I'm using PHP-Accelerator.

I have asked a lot of people and searched for people with similar
problems, but I did not find any. So my last Idea is that it's a PHP-Bug.

Reproduce code:
---------------
<?php
echo date("H:i:s")."\n";
echo gmdate("H:i:s");
?>

Expected result:
----------------
date: +-0 hours
gmdate -1 hour

Actual result:
--------------
date: -1 hour
gmdate -2 hours

-- 
Edit bug report at http://bugs.php.net/?id=24603&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24603&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24603&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24603&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24603&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24603&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24603&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24603&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24603&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24603&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24603&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24603&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24603&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24603&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24603&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24603&r=gnused

Reply via email to