ruddie Posted February 13, 2011 Share Posted February 13, 2011 I just recalled using date(); time() for lots of things in my database, including post times etc. At first I simply assumed this used server time or something, but when I changed my PC's time, it changed ! Now, shortly after this I simply assumed this was because of me using a localhost? But I am not certain anymore.. If I would place this online, would date() and time() return you server time or user time? I couldnt find it on google =-( Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 13, 2011 Share Posted February 13, 2011 You changed your computer's time, and you're using your computer as your host, and you aren't sure why your server's time changed....? Quote Link to comment Share on other sites More sharing options...
ruddie Posted February 13, 2011 Author Share Posted February 13, 2011 I am pretty sure, but since I can't test it on a real website, I don't know what it normally uses. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 13, 2011 Share Posted February 13, 2011 Did you try looking up date()? Not to mention, PHP runs on the server, not the client. There is NO WAY PHP's date function could ever access client's date and time. None. Quote Link to comment Share on other sites More sharing options...
ruddie Posted February 13, 2011 Author Share Posted February 13, 2011 Yes well, that makes sense, I was just wondering really.. - and yes I looked up date(). I was just a bit confused I guess =./ Thanks for clearing it up. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 13, 2011 Share Posted February 13, 2011 100% of the information php uses comes from the server, your server is php's client. Every thing php reads comes from your client (your server). Quote Link to comment 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.