'date' - print or set date and time - Video Man Pages

Опубликовано: 06 Август 2026
на канале: DistroTube
2,055
155

The 'date' command prints or sets the date and time.

Print the current date/time, using the default locale's format:
date +%c

Print the current date/time in UTC, using default format:
date -u

Print the current date/time in UTC, using the ISO 8601 format:
date -u +%Y-%m-%dT%H:%M:%S%Z

Print the date only using the ISO 8601 format:
date +%F
or
date +"%Y-%m-%d"

Print the date in MM/DD/YY format:
date +%D
or
date +"%m/%d/%y"

Print the time in HH:MM:SS format:
date +%T
or
date +"%H:%M:%S"

Print the current date as a Unix timestamp (seconds since the Unix epoch):
date +%s

Convert a Unix timestamp date (ex: 1773665635) to the default format:
date -d @1773665635

Convert a given date to the Unix timestamp format:
date -d "2020-03-01 00:00" +%s -u

Display the current date using the RFC-3339 format (YYYY-MM-DD hh:mm:ss TZ) and printing seconds (s):
date --rfc-3339 s
NOTE Instead of 's' for seconds, you could use 'n' for nanoseconds of 'd' for printing date only.

Set the current date providing a full timestamp in quotes (requires sudo privileges):
date -s "2026-03-16 14:30:00"

Set the current time while keeping the current date (requires sudo privleges).
date +%T -s "10:15:30"

REFERENCED:
► https://gitlab.com/dwt1/vidman - Video Man Pages

WANT TO SUPPORT THE CHANNEL?
💰 Patreon:   / distrotube  
💳 Paypal: https://www.paypal.com/donate/?hosted...
🛍️ Amazon: https://amzn.to/2RotFFi
👕 Teespring: https://teespring.com/stores/distrotube

DT ON THE WEB:
🕸️ Website: http://distro.tube
📁 GitLab: https://gitlab.com/dwt1
🗨️ Mastodon: https://fosstodon.org/@distrotube
👫 Reddit:   / distrotube  
📽️ Odysee: https://odysee.com/@DistroTube:2

FREE AND OPEN SOURCE SOFTWARE THAT I LIKE:
🌐 Brave Browser - https://brave.com/
📽️ Open Broadcaster Software: https://obsproject.com/
🎬 Kdenlive: https://kdenlive.org
🎨 GIMP: https://www.gimp.org/
💻 VirtualBox: https://www.virtualbox.org/
🗒️ Doom Emacs: https://github.com/hlissner/doom-emacs

Your support is very much appreciated. Thanks, guys!