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

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

DistroTube on Odysee

April 3, 20266m 35s

Audio is streamed directly from the publisher (player.odycdn.com) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.

Show Notes

thumbnail

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: https://www.patreon.com/distrotube
๐Ÿ’ณ Paypal: https://www.paypal.com/donate/?hosted_button_id=MW3ZFGS8Q9JGW
๐Ÿ›๏ธ 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: https://www.reddit.com/r/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!
...
https://www.youtube.com/watch?v=WZMf-fC45ak