terryds Posted July 26, 2013 Share Posted July 26, 2013 Hey, can you tell me how to change the php default timezone to GMT+7 ? Link to comment Share on other sites More sharing options...
niche Posted July 26, 2013 Share Posted July 26, 2013 http://php.net/manual/en/function.date-default-timezone-set.php Link to comment Share on other sites More sharing options...
picokojama Posted July 26, 2013 Share Posted July 26, 2013 Or you can change php.ini file once for all Link to comment Share on other sites More sharing options...
terryds Posted July 27, 2013 Author Share Posted July 27, 2013 @niche : In date_default_timezone_set, i have to type the location. But, what i want is to type the GMT+7 not the location, because not every location is supported by the timezone identifiers.. Can you tell me another way to change the timezone to GMT + x without using date_default_timezone_set or changing the php.ini ? I want my bulletin board users can see the time based on their location.... Link to comment Share on other sites More sharing options...
birbal Posted July 27, 2013 Share Posted July 27, 2013 http://php.net/manual/en/timezones.php here you can find list of supported time zone. you need to specify among these Link to comment Share on other sites More sharing options...
terryds Posted July 29, 2013 Author Share Posted July 29, 2013 What if i want it to just specify the time difference from GMT ? How to do that? Or, should i just make the time + x hours manually using plus operator ( x is the difference time) ? Link to comment Share on other sites More sharing options...
birbal Posted July 29, 2013 Share Posted July 29, 2013 http://www.php.net/manual/en/datetimezone.getoffset.php Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now