Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/165940-how-does-php-know-a-timezone/
Share on other sites

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.

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.