1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Timezone wrong in PHP?

Discussion in 'General Discussion' started by Kyle, Feb 21, 2003.

  1. Kyle

    Kyle New Member

    Joined:
    Jan 19, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    not sure whats wrong here. I recently installed cPanel and php timezone is all wrong..

    let me explain..
    Ok so the server system time is correct
    Hardware clock is also correct.
    This PHP Script
    PHP:
    <?php
    echo date("G:i:s A O" );
    ?>
    gives the following output:
    This is very frustrating. I've set the time correct (as far as I know) in every place I can think of, and set it as GMT-6. PHP refuses to recognize that and formats EVERYTHING as GMT+6....
    This has been driving me crazy, any ideas?

    [EDIT:Fixed]
    I recompiled apache/php and everything is wroking great. PHP must gather timezone info at compile time and keep it hard coded somewhere.
     
    #1 Kyle, Feb 21, 2003
    Last edited: Feb 21, 2003
  2. xphost

    xphost Member

    Joined:
    Nov 12, 2003
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    just

    hwclock --systohc

    and restart httpd
     
    #2 xphost, May 27, 2004
    Last edited: May 27, 2004

Share This Page