Page 1 of 1
How to change timezone in the server
Posted: Sat Jun 02, 2018 7:36 pm
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?
Re: How to change timezone in the server
Posted: Sat Jun 02, 2018 8:14 pm
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
Re: How to change timezone in the server
Posted: Sat Jun 02, 2018 8:16 pm
by SamDev
Hello Joan,
Yes. It is updated. Thank you for the help.
Re: How to change timezone in the server
Posted: Sat Jun 02, 2018 8:20 pm
by Joan N
Always welcome.