[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
howtos:hardware:syncing_hardware_clock_and_system_local_time [2012/09/26 01:30 (UTC)] – moved from the general howtos namespace mfillpot | howtos:hardware:syncing_hardware_clock_and_system_local_time [2013/01/11 17:47 (UTC)] – [Procedure to Synchronize the System Time to Hardware Clock] hazel | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> |
+ | <-- Reviewed 20130111 by hazel -->====== | ||
- | I would like people to check the accuracy | + | ===== Overview ===== |
+ | |||
+ | If you are booting multiple Linux distributions on the same machine, you might face the problem | ||
+ | |||
+ | If Distro X is configured to read the hardware clock as local time, it will show the time correctly, but if Distro Y is configured to read the hardware clock as set to UTC, then it will show an incorrect time. | ||
+ | |||
+ | This HOWTO attempts to provide a simple and cross-distribution one-time solution to the issue, making sure all your distributions know that your hardware clock is set to the local time (or UTC if you prefer it). | ||
+ | |||
+ | <note tip>The other solution to time management on a system is to synchronize your computer's clock with an NTP (Network Time Protocol) server.</ | ||
+ | |||
+ | ===== Procedure to Synchronize the System Time to Hardware Clock ===== | ||
+ | |||
+ | This is a one-time procedure to ensure that your hardware clock' | ||
+ | |||
+ | Assuming you are dual-booting Distro X and Y, first boot into Distribution X. First check the hardware clock with the following command. | ||
+ | | ||
+ | If your hardware clock is not set to your local time, then you must set the system time to local time. As root, | ||
+ | |||
+ | **Update via NTP:** If you installed the ntp package you can: \\ | ||
+ | | ||
+ | -or- \\ | ||
+ | **Manual update:** \\ | ||
+ | date --set "5 Aug 2012 12:54 IST" | ||
+ | Obviously | ||
+ | |||
+ | Now as root, synchronize the hardware clock to the current system time as local time. | ||
+ | | ||
+ | Now the hardware clock is readjusted to the system time and both now point to the local time. | ||
+ | |||
+ | < | ||
+ | |||
+ | Now boot into Distro Y and follow the same steps as above. It doesn' | ||
+ | |||
+ | ===== Syncing to UTC instead of Local Time ===== | ||
+ | |||
+ | Some people prefer setting their hardware clock to UTC (Universal Coordinated Time) instead of local time. If you want to set your hardware clock to UTC and adjust the date/time accordingly, | ||
+ | | ||
+ | while setting the hardware clock from your system time. | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | ====== Sources ====== | ||
+ | <!-- If you are copying information from another source, then specify that source --> | ||
+ | * Originally written by [[wiki: | ||
+ | * Based on Harishankar' | ||
+ | <!-- Authors are allowed to give credit to themselves! --> | ||
+ | <!-- * Originally written by [[wiki: | ||
+ | <!-- * Contrbutions by [[wiki: | ||
+ | |||
+ | <!-- Please do not modify anything below, except adding new tags.--> | ||
+ | <!-- You must also remove the tag-word " | ||
+ | {{tag> |