Setting time and timezone parameters
Back in the Stone Age of computing, maintaining accurate time on a computer wasn't all that important. To set the time on my old 8088-powered Sanyo PC clone, I just typed in whatever my watch said. That wasn't the most accurate way of doing things, but it didn't matter. The only real reason to set the computer time at all was to have somewhat accurate timestamps on the files that I created.
Nowadays, accurate timekeeping on computers is vitally important for a lot of reasons. Fortunately, we now have the Network Time Protocol (NTP), which is a lot more accurate than what my old-fashioned wind-up wristwatch was. The systemd
suite comes with the timedatectl
utility and systemd-timedated.service
to help us out. In this chapter, we'll talk about timedatectl
, but we'll save discussing systemd-timedated.service
until Chapter 17, Understanding systemd and Bootloaders.
To see the status of your machine's timekeeping,...