New function ltime() returns a struct tm of the current local time.
[u/mdw/putty] / time.c
1 #include <time.h>
2 #include <assert.h>
3
4 struct tm ltime(void)
5 {
6 time_t t;
7 time(&t);
8 assert (t != ((time_t)-1));
9 return *localtime(&t);
10 }