Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Timezone Asia/Kolkata changed to PST

Writer Sebastian Wright

What I did:

Ran this command:

sudo cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

What happened:

My local time changed to PST. Now I ran:

sudo cp /usr/share/zoneinfo/Asia/Kolkata /etc/localtime

But my system time didn't change back to IST. Instead, it's showing PST's time with the IST label.

screenshot showing the wrong time zone displayed

(In picture: I'm pointing to IST Kolkata, but the time zone highlighted is Los Angeles. This may explain my problem.)

Expected result:

I want Asia/Kolkata to be back to normal.

P.S.: With the command

sudo timedatectl set-timezone Asia/Kolkata

the timezone changed to IST with PST's time.

3 Answers

Uninstalling and reinstalling tzdata solved my problem:

sudo apt-get remove tzdata
sudo apt-get install tzdata

That's not the correct way to change the timezone in command line.

To reset your clock:

sudo apt install ntpdate

sudo ntpdate -s ntp.ubuntu.com

sudo dpkg-reconfigure tzdata

Select the correct timezone from the menu.

Next time if you want to set your timezone from command line:

timedatectl set-timezone [Region]/[City]

2

This will set timezone to Asia/Kolkata. timedatectl manages the time settings of your system.

sudo timedatectl set-timezone Asia/Kolkata

To view available list of timezones enter,

timedatectl list-timezones

Edit : I understand that your system S/W time is messed up. In this case use your hardware clock to set your system time by using the command below.

sudo hwclock --hctosys
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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