![]() |
setting the default time zone
Well I asked a simple question to deal with time zones ( range(-12,12) ), so he told me to look up date_default_timezone_set(), but I'm unclear on how to use it. How would I use that for creating a basic time zone script for dates?
To note my question was, how could I create a timezone script, if the default time() on different servers are always different? |
date_default_timezone_set() allows you to change the timezone for your script. For example:
PHP Code:
You can provide this functionality by storing the users timezone choice (full list: PHP: List of Supported Timezones - Manual) then using date_default_timezone_set() before you run any date/time functions. Also, PHP5 expects you to set a default timezone using date_default_timezone_set() before you use any date functions :-) Alan |
Okay how do I find out different times zones for GMT ? Right now im in -6GMT Central Standard Time. How could I use that function, but based on the different GMT (ie:: range(-12,12) ).
|
I'm not entirely sure what you are trying to achieve. Can you provide a bit more detail on what you want to do?
Alan |
Go in your vb control panel and change your GMT time to fit your timezone.
http://www.talkphp.com/profile.php?do=editoptions Go down to Dates and Time |
|
| All times are GMT. The time now is 08:13 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0