diff options
author | alfred <alfred@FreeBSD.org> | 2004-07-17 00:26:31 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2004-07-17 00:26:31 +0000 |
commit | bef73337d5e8608eaddc658ba2c44106ab78ded0 (patch) | |
tree | 04c4e07ed499e75a96f217fb1705dfb29d726e0f /bin/date | |
parent | 77a331dc4e06da4da45fc5e64286096fa0a84e6f (diff) | |
download | FreeBSD-src-bef73337d5e8608eaddc658ba2c44106ab78ded0.zip FreeBSD-src-bef73337d5e8608eaddc658ba2c44106ab78ded0.tar.gz |
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.
Diffstat (limited to 'bin/date')
-rw-r--r-- | bin/date/date.1 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/date/date.1 b/bin/date/date.1 index d8cdcef..917c5cd 100644 --- a/bin/date/date.1 +++ b/bin/date/date.1 @@ -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 : |