Skip to content

This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!


System time

TODO

Reference(s)

Table of contents


Use

TODO

  • Default way of changing time zone on SystemD:

    $ sudo timedatectl set-timezone Region/City
    

  • Default way of changing time zone on non-SystemD:

    $ sudo ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
    

  • Network time sync:

  • Set time manually:

    $ date # print date
    $ sudo date MMJJhhmmAAAA # set date and time manually (if needed)
    

  • Set hardware clock (not needed on a VM):

    # vi /etc/conf.d/hwclock # make sure that the system clock is indeed UTC
        > clock="UTC"
    
    # hwclock --show
    # hwclock --systohc # generate /etc/adjtime
    


If this cheat sheet has been useful to you, then please consider leaving a star here.