Give the most awesome example of how to parse the output of date
back into epoch time. Everytime I'm asked to do this by someone I have to spend about ten minutes recreating the same command line. So record it under examples.
This commit is contained in:
parent
59f7a82d52
commit
8a0f7000e6
@ -328,6 +328,14 @@ The command:
|
||||
sets the time to
|
||||
.Li "2:32 PM" ,
|
||||
without modifying the date.
|
||||
.Pp
|
||||
Finally the command:
|
||||
.Pp
|
||||
.Dl "date -j -f ""%a %b %d %T %Z %Y"" ""`date`"" ""+%s"""
|
||||
.Pp
|
||||
can be used to parse the ouput from
|
||||
.Nm
|
||||
and express it in epoch time.
|
||||
.Sh ENVIRONMENT
|
||||
The following environment variables affect the execution of
|
||||
.Nm :
|
||||
|
Loading…
x
Reference in New Issue
Block a user