Porteus clock. How it works.
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Porteus clock. How it works.
Some people, quite reasonably, can't quite understand how the clock works in Porteus. It is not such a simple topic. I will attempt to explain it as best I can so people with any questions can be directed here.
There are two clocks. Let's refer to them as the hardware clock and the software clock. The hardware clock is the machine clock. The one built into the motherboard. The other is a software clock. This is the clock shown on the panel in your desktop environment.
The hardware clock is dumb. It has no concept of time zones or the natural drift in time that all clocks suffer. It just holds a number. If you boot Porteus with no cheatcodes and no timezone changes then Porteus will simply show this hardware clock time in your software clock. This means that if windows set your hardware clock the last time it shut down, then Porteus will show it as windows left it. I repeat. By default Porteus DOES NOT touch your hardware clock.
If you use a timezone cheatcode then Porteus will:
1) create a symlink at /etc/localtime that points to your timezone in /usr/share/zoneinfo
2) change the time standard to utc if 'utc' cheatcode is present. It does this by editing the file /etc/hardwareclock.
3) sync the clock online (if available) using the command: ntpdate pool.ntp.org
4) store the current system time to the hardware clock based on your preference in /etc/hardwareclock (utc or localtime)
So, if you use a timezone cheatcode then Porteus will alter the hardware clock time. If you are booting multiple operating systems on the same machine then each one will probably want to write to the hardware clock. In this situation you may have problems with the incorrect time showing. You can avoid these problems by:
a) Making sure you set the correct standard in /etc/hardwareclock (localtime or UTC) and not using a timezone cheatcode.
b) Setting your hardware clock to UTC and then using the correct timezone cheatcode for your area.
NB: Older version of Porteus used a different technique, however there were many complaints that the time was frequently incorrect (due to the above concepts) and so a new more reliable technique is now used.
There are two clocks. Let's refer to them as the hardware clock and the software clock. The hardware clock is the machine clock. The one built into the motherboard. The other is a software clock. This is the clock shown on the panel in your desktop environment.
The hardware clock is dumb. It has no concept of time zones or the natural drift in time that all clocks suffer. It just holds a number. If you boot Porteus with no cheatcodes and no timezone changes then Porteus will simply show this hardware clock time in your software clock. This means that if windows set your hardware clock the last time it shut down, then Porteus will show it as windows left it. I repeat. By default Porteus DOES NOT touch your hardware clock.
If you use a timezone cheatcode then Porteus will:
1) create a symlink at /etc/localtime that points to your timezone in /usr/share/zoneinfo
2) change the time standard to utc if 'utc' cheatcode is present. It does this by editing the file /etc/hardwareclock.
3) sync the clock online (if available) using the command: ntpdate pool.ntp.org
4) store the current system time to the hardware clock based on your preference in /etc/hardwareclock (utc or localtime)
So, if you use a timezone cheatcode then Porteus will alter the hardware clock time. If you are booting multiple operating systems on the same machine then each one will probably want to write to the hardware clock. In this situation you may have problems with the incorrect time showing. You can avoid these problems by:
a) Making sure you set the correct standard in /etc/hardwareclock (localtime or UTC) and not using a timezone cheatcode.
b) Setting your hardware clock to UTC and then using the correct timezone cheatcode for your area.
NB: Older version of Porteus used a different technique, however there were many complaints that the time was frequently incorrect (due to the above concepts) and so a new more reliable technique is now used.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.