How to change timezone in the server

Discussions related with hosting control panels used, which include cPanel, Plesk, Directadmin etc..

Moderator: Staff

Post Reply
SamDev
Posts: 0
Joined: Sun Apr 29, 2018 9:03 am

How to change timezone in the server

Post by SamDev »

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?


Joan N
Posts: 0
Joined: Mon Mar 27, 2017 11:46 am

Re: How to change timezone in the server

Post by Joan N »

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


SamDev
Posts: 0
Joined: Sun Apr 29, 2018 9:03 am

Re: How to change timezone in the server

Post by SamDev »

Hello Joan,

Yes. It is updated. Thank you for the help.


Joan N
Posts: 0
Joined: Mon Mar 27, 2017 11:46 am

Re: How to change timezone in the server

Post by Joan N »

Always welcome.


If you are looking for assistance in server management, please get in touch with our support.
Post Reply