scripts to use EST or any other timezone you need by the following methods :
1) Using the function "putenv" in php scripts :
To convert Time Zone using putenv
<?
echo "Original Time: ". date("h:i:s")."\n";
putenv("TZ=US/Eastern");
echo "New Time: ". date("h:i:s")."\n";
?>
==============================================
2) By putting the following in the .htaccess file in your main public_html folder :
==============================================
SetEnv TZ "US/Eastern"
==============================================
You can use 1st OR 2nd method however in case your choice is 2nd - all php data/time functions will use timezone in .htaccess.
Also you should use "US/Central" or "GMT-6", this is identical
Below is a list of timezones and the offset (in hours) from UTC (Universal Coordinated Time). Find your geographic area on the list to determine your offset.
UTC Offset Geographic Area
0 England, Ireland, Portugal
+1 Europe: France, Spain, Germany, Poland, etc.
+2 Central Europe: Turkey, Greece, Finland, etc.
+3 Moscow, Saudi Arabia
+4 Oman
+5 Pakistan
+6 India
+7 Indonesia
+8 China, Phillipines, Malaysia, West Australia
+9 Japan
+10 East Australia
+11 Solomon islands, Micronesia
+12 Marshall Islands, Fiji
-11 Samoa, Midway
-10 Hawaii, French Polynesia, Cook island
-9 Alaska
-8 US Pacific
-7 US Mountain
-6 US Central
-5 US Eastern
-4 New Foundland, Venezuela, Chile
-3 Brazil, Argentina, Greenland
-2 Mid-Atlantic
-1 Azores, Cape Verda Is.
Categories
4
Backup/Restore
6 Billing & Accounts
0 CGI - Advanced Webmasters
10 CloudLinux (cPanel)
24 cPanel - Control Panel
2 Cpanel - Features & Functions
11 Databases
48 DirectAdmin
6 DNS - Nameservers
10 Domain Management
17 Email
6 Email Without Mysteries
9 FTP
4 FTP & Uploading Files
16 General Questions
7 Getting Started
6 Installing a Control Panel
8 Mail Filters & SPAM
11 Mobile
3 Others
7 PayPal
9 PHP & MySQL
47 Plesk
10 Security
58 SiteWorx/InterWorx
69 Softaculous
18 SolusVM
5 SSL
21 Technical Support
19 Virtualizor
18 WHM
17 WordPress
Categories
Knowledgebase
- Home
- Knowledgebase
- PHP & MySQL
- Change TimeZone
- 319 Users Found This Useful
Related Articles
How to turn on register_globals
The register_globals can be turned on in your php.ini file. To do this, create a php.ini file in...
I need PHP5 for my scripts, but the server has PHP4 installed only. Please upgrade PHP.
We already have PHP5 running in our servers. It has been compiled with all the options in...
Do you support PHP Suexec?
Yes, we do support it.
Do you support FormMail.php?
Yes, we support FormMail.php. We do not have it in our cgi-bin so you need to install it on your...