Categories
Abuse and Security
4
Advanced Users
11
Cloud Hosting Basic Questions
4
CloudFlare
6
cPanel
13
Domain Names
11
Email
12
FFmpeg
1
Free Website Transfer
2
Free Website Transfer
1
FTP Basics
2
ID Protection / Domain Privacy
3
MySQL Basics
4
Name Servers (DNS)
1
PHP
1
Pre Sales Questions
12
Reseller Hosting
7
Sales & Billing
13
Shared Hosting
9
Softaculous
1
SSH
3
SSL Certificates
3
Troubleshooting
8
VPS and Dedicated Servers
4
Website Transfer Service
1
WordPress
1
Categories
How to change the date.timezone value in PHP? Print
- 32
If your PHP scripts do not show the correct time, the reason is that most probably your hosting server is in a different timezone. This can be easily resolved by changing a setting in PHP called date.timezone.
Depending on your location you can set a specific date.timezone value in PHP using the following option which should be added to your local php.ini file:
date.timezone = "US/Central"
The above example assumes you'd like to set the timezone for your PHP scripts to US/Central. The full list of supported time zones is available here and you should simply replace "US/Central" with the desired timezone.
Was this answer helpful?
Related Articles
Cron jobs
A 'cron job' is an automated task that can be set up within your cPanel. This will typically be...
Disabling catch-all email
If you wish to disable the default catch-all email address - i.e. you will only receive email to...
File permissions
There are a number of file permissions, which can be used for a variety of different purposes,...
How do I create a custom php.ini file?
A custom php.ini file can be constructed and placed in your web account. For instance, using a...
How to connect using SSH (secure shell)
How to connect using SSH:
You are going to need an SSH Client. We recommend a program "PuTTY"....
Loading...
Loading...