|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-11 10:51 UTC] sniper@php.net
[2003-07-11 11:25 UTC] akorthaus at web dot de
[2003-07-11 11:28 UTC] akorthaus at web dot de
[2003-07-11 12:14 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 08:00:02 2025 UTC |
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