1

I'm trying to change local timezone on Ubuntu 14.04 with the following commands.

$ echo Asia/Tokyo > /etc/timezone
$ dpkg-reconfigure --frontend noninteractive tzdata

Current default time zone: 'Asia/Tokyo'
Local time is now:      Fri Apr 22 13:47:04 UTC 2016.
Universal Time is now:  Fri Apr 22 13:47:04 UTC 2016.

However, localtime is still UTC not Asia/Tokyo.

I can change the timezone with timedatectl.

$ timedatectl set-timezone Asia/Tokyo
$ timedatectl
  Local time: Fri 2016-04-22 23:07:29 JST
  Universal time: Fri 2016-04-22 14:07:29 UTC
    Timezone: Asia/Tokyo (JST, +0900)
  NTP enabled: yes
  NTP synchronized: yes
  RTC in local TZ: no
  DST active: n/a

Once I change timezone with timedatectl then I can also change with dpkg-reconfigure to any timezone.

Has anyone had the same issue?

Thanks!

0

Ok, this was because of my stupid mistake. I was doing something like this in my script.

ln -sf /usr/share/zoneinfo/ /etc/localtime

Changing to the following fixed the issue.

ln -sf /usr/share/zoneinfo/Etc/UTC  /etc/localtime

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.