newbtophp Posted July 29, 2010 Share Posted July 29, 2010 Hi, Would time() produce the timestamp based on your time environment or the servers?, if it produces the timestamp based on the server; how would I generate a timestamp (which I can later use within date()); so it displays to the users timezone? Quote Link to comment https://forums.phpfreaks.com/topic/209249-detect-your-time/ Share on other sites More sharing options...
Psycho Posted July 29, 2010 Share Posted July 29, 2010 PHP is server-side so it returns the timestamp based upon the server. To get the user's time you can use JavaScript - perhaps set a cookie that can be read by PHP or something like that. Quote Link to comment https://forums.phpfreaks.com/topic/209249-detect-your-time/#findComment-1092669 Share on other sites More sharing options...
newbtophp Posted July 29, 2010 Author Share Posted July 29, 2010 Ok cool, I can use ajax or get the time using js store it in a cookie, and then fetch the cookie using php. /Solved Quote Link to comment https://forums.phpfreaks.com/topic/209249-detect-your-time/#findComment-1092680 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.