Linux Selecting Time Zone does not change time time on the Virtual Machine

Linux Selecting Time Zone does not change time time on the Virtual Machine

Click to Watch Video

Question: Why is it so hard to change time and synchronize time on Multiple Server Machines? I am trying to set time to the correct Time Zone by typing:

1. tzselect in Linux Command (Shell) and going through the wizard but the time does not change on the VM.
2. I have tried to update the System in hope that the time will be updated to the timezone set in the TimeZone file located in /etc folder.

What is going on?


Answer: Changing the time on a Linux distro is always an issue, at least to the best of my knowledge. Sometimes, what works for another Developer does not necessarily work for another. In this case, I will share what worked for me.

Steps:

1. Make sure that you have a file called localtime in folder called /etc.
    - Type: cd /etc
    - Then type: ls. #to list all subfolders and files in the /etc directory.
2. After verifying the localtime does actually exists, move on to step 3.
3. Navigate to /usr/share/zoneinfo/America #Or find your Time Zone in the zoneinfor folder and make note that the file 

    [NB]: Make sure the Time Zone you have noted is actually a file and not a folder. Folders have a different color than a file, so make sure your time zone is actually a file because we are going to make a copy of that file. It would jeopardize every if you made a mistake thinking the Folder was a file and then copying that folder into a file. 

4. Type: sudo cp /usr/share/zoneinfo/America/Detroit /etc/localtime
5. After the command has been executed verify the date and time are actually correct. 
    Type: date


I hope this helped you, if not then check out the other article Here.
Did you know you could edit this article? click on Edit this Article below to Edit.


Edit this Article
tzselect in linux time zone in linux synchronize time in multiple Virtual machines ebook linux Technology published
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback

Edited Version 2


Question: Why is it so hard to change time and synchronize time on Multiple Server Machines? I am trying to set time to the correct Time Zone by typing:

1. tzselect in Linux Command (Shell) and going through the wizard but the time does not change on the VM.
2. I have tried to update the System in hope that the time will be updated to the timezone set in the TimeZone file located in /etc folder.

What is going on?


Answer: Changing the time on a Linux distro is always an issue, at least to the best of my knowledge. Sometimes, what works for another Developer does not necessarily work for another. In this case, I will share what worked for me.

Steps:

1. Make sure that you have a file called localtime in folder called /etc.
    - Type: cd /etc
    - Then type: ls. #to list all subfolders and files in the /etc directory.
2. After verifying the localtime does actually exists, move on to step 3.
3. Navigate to /usr/share/zoneinfo/America #Or find your Time Zone in the zoneinfor folder and make note that the file 

    [NB]: Make sure the Time Zone you have noted is actually a file and not a folder. Folders have a different color than a file, so make sure your time zone is actually a file because we are going to make a copy of that file. It would jeopardize every if you made a mistake thinking the Folder was a file and then copying that folder into a file. 

4. Type: sudo cp /usr/share/zoneinfo/America/Detroit /etc/localtime
5. After the command has been executed verify the date and time are actually correct. 
    Type: date


I hope this helped you, if not then check out the other article Here.
Did you know you could edit this article? click on Edit this Article below to Edit.

If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.
Your Session is Ending
Login to Continue


© 2021 - ErnesTech - Privacy