scrubbicus Posted March 1, 2009 Share Posted March 1, 2009 Two questions. First off my date() when I was testing it on my computer it gave me my time (PST) and I just uploaded everything a few moments ago and now it's 2 hours ahead of my time. Is that because my host is probably in a time zone that's ahead of me? Is there anyway to set the time in accordance with time zones? If not then is there a way I can just set it to PST? Any help would be awesome. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/147400-date-and-used-while-loop-to-iterate-and-get-users/ Share on other sites More sharing options...
RussellReal Posted March 1, 2009 Share Posted March 1, 2009 if you're on shared hosting you most likely don't have access to the php.ini so you'd have to use date_default_timezone_set in each php script you have that uses date. if you do have access to php.ini try ini_set setting the value of 'date.timezone' to your timezone.. -- Either way lol, both work the same way.. You could open up the php ini manually and change it and save it permanently.. but only if you have access.. Quote Link to comment https://forums.phpfreaks.com/topic/147400-date-and-used-while-loop-to-iterate-and-get-users/#findComment-773678 Share on other sites More sharing options...
scrubbicus Posted March 1, 2009 Author Share Posted March 1, 2009 It doesn't work. It's working on my Apache I can put the time hours ahead or back but when I upload it and set it to America/Los Angeles it still gives me there +2 hours time. Quote Link to comment https://forums.phpfreaks.com/topic/147400-date-and-used-while-loop-to-iterate-and-get-users/#findComment-773990 Share on other sites More sharing options...
RussellReal Posted March 1, 2009 Share Posted March 1, 2009 use http://us2.php.net/manual/en/timezones.america.php to find the closest american timezone Quote Link to comment https://forums.phpfreaks.com/topic/147400-date-and-used-while-loop-to-iterate-and-get-users/#findComment-774169 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.