unix-zeit
Erik Heinz
erik at iks-jena.de
Don Aug 9 10:01:05 CEST 2001
On Thu, Aug 09, 2001 at 09:48:27AM +0200, Andreas.Roth wrote:
> moin.. gebt mir doch mal bitte schnell nen tipp, wie ich unix zeit in
> "normale zeit" umrechnen kann.
-------------------------adate.c-------------------------------------------
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
time_t t1;
if ((argc < 2) || (t1 = atol(argv[1])) <= 0) {
fprintf(stderr, "Syntax: adate [sec since 1970]\n");
exit(-1); }
puts(ctime(&t1));
return(0);
}
--
| Erik Heinz, IKS GmbH Jena * erik at iks-jena.de * privat: erik at jena.thur.de |
+---------------------------------------------------------------------------+
--
tlug Mailingliste
liste at tlug.de
http://schwarz.thueday.de/mailman/listinfo/tlug_allgemein