Reading system time in Xenix OS

uunet!bria!mike uunet!bria!mike
Sun Feb 3 05:08:52 AEST 1991


In article <15 at neis.UUCP> molnar at neis.UUCP (Christopher Molnar) writes:
>Hopefully someone out there has done this, I've been trying to get the 
>asctime() function to work properly as its described in the Xenix
>development system manuals, it won't compile it dumps the core. [...]

#include <stdio.h>
#include <time.h>

main()
{
long now;
struct tm *ptr;

	time(&now);
	ptr = localtime(&now);
	puts(asctime(ptr));
}
-- 
Michael Stefanik                       | Opinions stated are not even my own.
Systems Engineer, Briareus Corporation | UUCP: ...!uunet!bria!mike
-------------------------------------------------------------------------------
technoignorami (tek'no-ig'no-ram`i) a group of individuals that are constantly
found to be saying things like "Well, it works on my DOS machine ..."



More information about the Comp.lang.c mailing list