May 2017
Beginner
552 pages
28h 47m
English
It is possible to read the dates in different formats and also to set the date.
$ date
Thu May 20 23:09:04 IST 2010
$ date +%s
1290047248
The date command can convert many formatted date strings into the epoch time. This lets you use dates in multiple date formats as input. Usually, you don't need to bother about the date string format you use if you are collecting the date from a system log or any standard application generated output. Convert the date string into epoch:
$ date --date "Wed mar 15 08:09:16 EDT 2017" +%s
1489579718
The --date option defines a date string as input. We can use any date formatting options to print the output. The date command can be used to ...