× Contact
Home ☰ Menu

How to change server time on Ubuntu 14.04

2018. 01. 24. 10:33

Linux

Ubuntu 14.04

Timezone

Configuration

It's a very simple but useful way to change the server default timezone by location if you use Ubuntu 14.

Simply just use this code to change the default timezone:

dpkg-reconfigure tzdata

After this, you should get this screen:

First select the Geographic area. Then you should hit enter and select the capital city.

 

If it does not work you should try this method:

 

  1. Open php.ini (PHP configuration file)
  2. Set your timezone – for example I set to Europe/Budapest – here is the full list of the PHP timezones 
    date.timezone = "Europe/Budapest";
  3. Restart Apache

 

Please follow the instructions, it’s very simple. I hope it helps a lot. :)

Peter Sipos

I am a Web developer. I am developing in web languages like: PHP, HTML, JavaScript, jQuery, NodeJS. In the following posts you can learn some useful techniques.

6 articles available

More articles