Difference between revisions of "Gdate"

From NovaOrdis Knowledge Base
Jump to: navigation, search
(Created page with "=Internal= * date =Overview= GNU version of the 'date' command. =ISO 8601 Date Format=")
 
(ISO 8601 Date Format)
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
  
 
GNU version of the 'date' command.
 
GNU version of the 'date' command.
 +
 +
=Installation=
 +
 +
brew install coreutils
  
 
=ISO 8601 Date Format=
 
=ISO 8601 Date Format=
 +
 +
gdate -I[FMT]
 +
 +
gdate --iso-8601[FMT]
 +
 +
Without format,
 +
gdate --iso-8601
 +
displays the date only:
 +
2020-05-18
 +
 +
Format can be "date", "hours", "minutes", "seconds", "ns":
 +
 +
gdate --iso-8601=seconds
 +
 +
2020-05-18T19:57:24-07:00

Revision as of 02:57, 19 May 2020

Internal

Overview

GNU version of the 'date' command.

Installation

brew install coreutils

ISO 8601 Date Format

gdate -I[FMT]
gdate --iso-8601[FMT]

Without format,

gdate --iso-8601

displays the date only:

2020-05-18

Format can be "date", "hours", "minutes", "seconds", "ns":

gdate --iso-8601=seconds
2020-05-18T19:57:24-07:00