35 lines
1.5 KiB
Plaintext
35 lines
1.5 KiB
Plaintext
$OpenBSD: patch-contrib_trytime_trytime_c,v 1.1 2004/06/08 20:21:24 danh Exp $
|
|
--- contrib/trytime/trytime.c.orig 2003-11-29 11:51:13.000000000 -0500
|
|
+++ contrib/trytime/trytime.c 2004-06-08 11:19:33.000000000 -0400
|
|
@@ -83,22 +83,22 @@ int main ( int ac, char **av )
|
|
strftime(tim_b,100,"%c %Z",localtime(&start_tmp));
|
|
if( *soption )
|
|
printf( "Start time was specified as: '%s',\n"
|
|
- "for me this means: %s (or %ld sec since epoch)\n\n",
|
|
- soption, tim_b, start_tmp );
|
|
+ "for me this means: %s (or %.0f sec since epoch)\n\n",
|
|
+ soption, tim_b, difftime(start_tmp, 0) );
|
|
else
|
|
printf( "Start time was not specified, default value will be used (end-24h)\n"
|
|
- "for me this means: %s (or %ld sec since epoch)\n\n",
|
|
- tim_b, start_tmp );
|
|
+ "for me this means: %s (or %.0f sec since epoch)\n\n",
|
|
+ tim_b, difftime(start_tmp, 0) );
|
|
|
|
strftime(tim_b,100,"%c %Z",localtime(&end_tmp));
|
|
if( *eoption )
|
|
printf( "End time was specified as: '%s',\n"
|
|
- "for me this means: %s (or %ld sec since epoch)\n",
|
|
- eoption, tim_b, end_tmp );
|
|
+ "for me this means: %s (or %.0f sec since epoch)\n",
|
|
+ eoption, tim_b, difftime(end_tmp, 0) );
|
|
else
|
|
printf( "End time was not specified, default value will be used (now)\n"
|
|
- "for me this means: %s (or %ld sec since epoch)\n\n",
|
|
- tim_b, end_tmp );
|
|
+ "for me this means: %s (or %.0f sec since epoch)\n\n",
|
|
+ tim_b, difftime(end_tmp, 0) );
|
|
exit(0);
|
|
}
|
|
|