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 =-( Link to comment https://forums.phpfreaks.com/topic/227545-server-datetime/ 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....? Link to comment https://forums.phpfreaks.com/topic/227545-server-datetime/#findComment-1173728 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. Link to comment https://forums.phpfreaks.com/topic/227545-server-datetime/#findComment-1173731 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. Link to comment https://forums.phpfreaks.com/topic/227545-server-datetime/#findComment-1173734 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. Link to comment https://forums.phpfreaks.com/topic/227545-server-datetime/#findComment-1173737 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). Link to comment https://forums.phpfreaks.com/topic/227545-server-datetime/#findComment-1173739 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.