From 8a0f7000e6262028c0aa015d891a9da5dc2ef97f Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Sat, 17 Jul 2004 00:26:31 +0000 Subject: [PATCH] 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. --- bin/date/date.1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/date/date.1 b/bin/date/date.1 index d8cdcef353c4..917c5cd75fa4 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 :