Hello,
I have a VPS without any control panel installed. I would like to change the timezone of my server to America/New_York. How can I do that?
How to change timezone in the server
Moderator: Staff
cPanel Server Management
@ 30$ Onwards
@ 30$ Onwards
Re: How to change timezone in the server
Hello,
For changing the PHP time zone,
1. First locate the loaded PHP INI file using the command #php --ini
2. Open it using any text editor
Eg: vi /usr/local/lib/php.ini
3. Find "date.timezone =" in the file. Then add the timezone there like below,
date.timezone = "America/New_York"
4. Save and exit
5. Restart the Apache
For changing the PHP time zone,
1. First locate the loaded PHP INI file using the command #php --ini
2. Open it using any text editor
Eg: vi /usr/local/lib/php.ini
3. Find "date.timezone =" in the file. Then add the timezone there like below,
date.timezone = "America/New_York"
4. Save and exit
5. Restart the Apache