Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2014
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Get time Is it server or user computer time?

    I have small problem with getting time.

    If I have follow code(s) in one of my page in my server:

    $current_date = time();
    echo "$current_date";
    or
    $dayNumber = date("z") + 1;
    echo "$dayNumber";

    Which day it will pickup? the one whats in user's computer or server's time?


    Thank you if someone have time to help noob.

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,269
    Thanks
    10
    Thanked 277 Times in 276 Posts
    It's server code, running on the server, so it gets the server's time (and time zone). Client time would require client code (Javascript).

  • Users who have thanked tracknut for this post:

    Justanothernoob (06-01-2014)


  •  

    Posting Permissions

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