odd time problem..

Discussion in 'PHP' started by klown, Mar 26, 2007.

  1. #1
    I'm having a problem with a program which I made to display the difference between timezones. You can see it here]. The strange thing is that I seem to get different information depending on where the user is located. I see the correct time here in Mainland China, However my friend located in Hong Kong sees something totally different.

    Its strange the the user has anything to do with it since the we're viewing the same script and that runs off of a server in the states..
     
    klown, Mar 26, 2007 IP
  2. cakker

    cakker Well-Known Member

    Messages:
    165
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    140
    Digital Goods:
    1
    #2
    hi, could the daylightsavings cause the problem? I just checked the time in Hungary and it was 1 hour less.

    krisztian
     
    cakker, Mar 26, 2007 IP
  3. klown

    klown Peon

    Messages:
    2,093
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Maybe, but I can't figure out why, after all the shouldn't the time come from the server not the user?

    At the start of the script I use the following to make sure we start out at the correct time:
    date_default_timezone_set("GMT")
    PHP:
     
    klown, Mar 26, 2007 IP