1. Proper formating of the man page.
2. Corrected the documentation about the possibility to omit the timestamp.
This commit is contained in:
40
unixtime.1
40
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] <TIMESTAMP>
|
||||
.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 <TIMESTAMP>, 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 <heinzel@heinzelwelt.de>
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR time (2),
|
||||
.BR ctime (3)
|
||||
.BR ctime (3),
|
||||
.BR time (2)
|
||||
|
||||
|
||||
@@ -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] <TIMESTAMP>\n");
|
||||
printf("Usage: unixtime [<timestamp>]\n"
|
||||
" [-h, --help] [-V, --version]\n");
|
||||
printf("\n");
|
||||
printf("Where <TIMESTAMP> is the number of seconds since the Epoch\n");
|
||||
printf("Where <timestamp> 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
|
||||
|
||||
Reference in New Issue
Block a user