4

I have an instance running Ubuntu Minimal 18.04 LTS on Google Cloud.

I want to change the system timezone, but timedatectl list-timezones shows only UTC, so timedatectl set-timezone <timezone> fails because any <timezone> other than UTC is invalid.

How do I add a timezone so that I can then set the system to it?

Thanks!

  • 1
    try sudo dpkg-reconfigure tzdata – Nmath Jul 9 '19 at 2:38
  • @Nmath It gave me a rather long error, basically saying that tzdata wasn't installed. I did sudo apt install tzdata and it installed lots of timezones, so now I can change it. Thanks! – ironcito Jul 9 '19 at 2:58
4

I solved the problem by installing the package tzdata:

sudo apt update
sudo apt install tzdata

...which installs the timezone database and also asks for the preferred timezone during installation.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.