JREAM Posted July 14, 2009 Share Posted July 14, 2009 I cant figure out which is which here. You can mktime() and date() and microtime() and time(), Are these all configured in GMT standards? When you install a PHP script how do they know what your timezone is? Is there a way to automatically identify the Hardware or web Server or something? Quote Link to comment https://forums.phpfreaks.com/topic/165940-how-does-php-know-a-timezone/ Share on other sites More sharing options...
JonnoTheDev Posted July 14, 2009 Share Posted July 14, 2009 When you install a PHP script how do they know what your timezone is By magic! No, your server's settings are used. Change the timezone on your sever if required. If you cannot do this then php has functions to display the correct time for your locale. Quote Link to comment https://forums.phpfreaks.com/topic/165940-how-does-php-know-a-timezone/#findComment-875209 Share on other sites More sharing options...
premiso Posted July 14, 2009 Share Posted July 14, 2009 There are also a few function available to PHP for you to look at, however I would suggest setting it at the server level to to GMT 0, so it is stored in your database at a neutral time, then use PHP to display different timezones for the users. Not required, but can make it easier incase you change server locations etc. http://us3.php.net/manual-lookup.php?pattern=timezone&lang=en Quote Link to comment https://forums.phpfreaks.com/topic/165940-how-does-php-know-a-timezone/#findComment-875211 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.