SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Local time...?

  1. #1
    SitePoint Zealot .[:] : paVel : [:].'s Avatar
    Join Date
    May 2002
    Location
    Australia
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Local time...?

    Hey,
    Does anyone know how i can make a script... so it gets the time from the SERVER.... not from the user computer.
    ??????

  2. #2
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any PHP script you use that utilizes the date() function will return the time as it is on the server. PHP doesn't have a direct way to interact with the client computer's time.

    -Colin
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  3. #3
    SitePoint Member Rupert's Avatar
    Join Date
    May 2002
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do this

    <?php
    echo date("F d, Y g:i a");
    ?>

    you'll get the date and the time! Mega Bonus!!
    www.bonfire.tk


Bookmarks

Posting Permissions

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