arizona time

Discussion in 'PHP' started by gigamike, Sep 4, 2007.

  1. #1
    Guys,

    maybe you can help me, maybe setlocale is the answer but im not sure what should be the paramater. My goal is that i need to have the current Arizona time in the US Which is Mountain standard time.

    Thanks,

    Mike
     
    gigamike, Sep 4, 2007 IP
  2. loibeignacio

    loibeignacio Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi sir Mike,

    have you tried date_default_timezone_set?

    <?php
    date_default_timezone_set('America/Phoenix');
    ?>
    PHP:
    Mabuhay,
    Loibe
     
    loibeignacio, Sep 4, 2007 IP
  3. gigamike

    gigamike Active Member

    Messages:
    165
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Hi loibe,

    Thanks for the quick response but unfortunately im using php 4 :(.

    What i did as of the moment is that i adjusted the server time to Arizona time

    i.e.
    // Server GMT is Eastern European Time
    $arizona=9*60*60; // 9 hours discrepancy

    $server_datetime=date("Y-m-d H:i:s");
    $arizona_datetime=date("Y-m-d H:i:s", time()-$arizona);


    Hey, no sir, were at the same age...lol

    Thanks again,

    Mike

     
    gigamike, Sep 4, 2007 IP