diff --git a/unixtime.1 b/unixtime.1 index 8e7f06d..f1f2001 100644 --- a/unixtime.1 +++ b/unixtime.1 @@ -1,25 +1,43 @@ .\" unixtime.1 -.TH UNIXTIME 1 "Feb. 2008" "heinzel" +.TH UNIXTIME 1 2008-02 "heinzelwerk" .SH NAME unixtime \- converts a unix timestamp into a human readable date .SH SYNOPSIS -.B unixtime [-h, --help] [-V, --version] +.B unixtime +.RI [ timestamp ] +.LP +.B unixtime +.BR -h | --help +| +.BR -V | --version .SH DESCRIPTION -\fBunixtime\fP is similar to the standard c library function \fBctime()\fP +.B unixtime +print out the date, that is given as +.IR timestamp . +.PP +.I timestamp +should be an integer value, that represent seconds since the Epoch. +.PP +If +.I timestamp +is ommited, it will default to 0, which has the effect, that the +begin of the Epoch will be shown. +.PP +The format of the date string depends on +.BR ctime (3). +.PP +Normal output goes to stdout, errors and warnings to stderr. -.SH OPTIONS -An integer , which is a number of seconds since the Epoch. +.SH BUGS +Since I have no true understanding of C, I am sure, there are. -.SH "BUGS" -Since I have no real understanding of C, I am sure, there are. - -.SH "AUTHOR" +.SH AUTHOR heinzel .SH "SEE ALSO" -.BR time (2), -.BR ctime (3) +.BR ctime (3), +.BR time (2) diff --git a/unixtime.c b/unixtime.c index 80337be..0a3cc46 100644 --- a/unixtime.c +++ b/unixtime.c @@ -120,9 +120,10 @@ int print_help( void ) { printf("%s converts a unix timestamp into a human readable date.\n", progname); printf("\n"); - printf("Usage: unixtime [-h, --help] [-V, --version] \n"); + printf("Usage: unixtime []\n" + " [-h, --help] [-V, --version]\n"); printf("\n"); - printf("Where is the number of seconds since the Epoch\n"); + printf("Where is the number of seconds since the Epoch\n"); if((p = strdup(ctime(& t))) != NULL) { /* ctime() return the date as string with an appended new line. * Since we do not want the new line to be printed, we terminate