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!

2
  • 1
    try sudo dpkg-reconfigure tzdata
    – Nmath
    Jul 9, 2019 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, 2019 at 2:58

1 Answer 1

5

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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .