#include <time.h> s = asctime( loctim );
"asctime" translates the given time structure into an ASCII string. The form of the string is
Wed Apr 20 15:34:55 1983\n\0
Since "asctime" always writes this string to the same memory location, every call to "asctime" overwrites the old time string.
expl c lib localtime
expl c lib time
expl c lib ctime
Copyright © 1996, Thinkage Ltd.