Results 1 to 4 of 4

Thread: Take SERVER time

  1. #1

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362

    Take SERVER time

    How can you take the SERVER time and not the machine time of the user?

    Time() use the time of the machine... what is the function to have the time of the server?

  2. #2
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    huh? time() is from the server

    in order to get the time of the user you have to take in account of the users time offset to the GMT. easier to say is you have to know where the user lives.
    Last edited by phpman; May 6th, 2003 at 09:39 PM.

  3. #3

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    [PHP] $now = time()
    $servertime = date("Y-m-d h:i:s A",$now);
    echo($servertime);
    PHP]

    Parse error: parse error, unexpected T_VARIABLE in c:\program files\easyphp\www\droit.php on line 76

    Why?

  4. #4
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    you forgot a semicolon after time()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width