I have a virtual machine that is set to PST that a couple of colleagues have in different timezones. If I wanted to change the time-zone to EST and GMT, what do I need to do?
|
|
Use
|
|
Not a fan of +1 comments, but am putting one here since this worked for me in the best way. I was wanting a single one-line command line tool to change the timezone, rather than wanting to launch some whole either menu or gui program (I don't know what
tzdata does, how it works, but I don't need to with this one line command). Thanks!
– Phil Ryan
Jun 1 '15 at 23:21
|
||
|
|
|||
|
|
Interestingly, it is doing something a little different than tzdata. I had an issue with Java time being different than the system time after applying a patch. Tzdata didn't work to fix the issue, but this did.
– Daniel Bower
Mar 23 '16 at 15:54
|
||
|
this didn't work for me; however the
dpkg-reconfigure did the trick.
– Antti Haapala
Apr 10 '16 at 11:39
|
||
|
|
|
Execute the following command:
A menu based tool should be started that allows you to change the timezone. |
|||||
|
|
The following also work. For GMT:
For EST:
|
|||||
|
|
As root you have to execute:
A menu based tool should be started that allows you to change the timezone. |
||||
|
|
|
The most ease way especially to a server is to list timezones:
And choose yours, for example:
Thats it! , :-) |
|||
|
|
|
To run one program with a different time zone setting, set the |
|||
|
|
|
Edit the
You can use the next format:
Example of
or
You may experiment with the: You must reboot or start again a service (not the ntp service). I do not know which one. If somebody knows please share with us. (Tested on Ubuntu 15.10 the change is taken into account instantly) |
||||
|
|
|
cp -p /usr/share/zoneinfo/US/Pacific /etc/localtime I recommend AGAINST linking like mentioned by others. If some script accidentally over writes your /etc/localtime file, then it overwrites your Pacific timezone file... and it's a bit of a pain to replace it. Just copy the Pacific file over the localtime file with the command above. |
|||
|
|