Set date and time manually in linux shell

From DevOps Notebook
Revision as of 13:19, 5 February 2022 by MilosZ (talk | contribs) (Created page with "<pre> # date -s "28 JUN 1984 09:30:00" # date +%Y%m%d -s "19830628" # date +%T -s "09:30:00" # timedatectl set-ntp no # timedatectl set-time '1983-06-28' # timedatectl set-tim...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
# date -s "28 JUN 1984 09:30:00"
# date +%Y%m%d -s "19830628"
# date +%T -s "09:30:00"
# timedatectl set-ntp no
# timedatectl set-time '1983-06-28'
# timedatectl set-time '1983-06-28 09:30:00'