1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-08 08:58:00 +00:00
putty-source/time.c
Jacob Nevins 162398e55e Comment explaining location in top-level directory.
[originally from svn r5270]
2005-02-07 15:23:45 +00:00

17 lines
366 B
C

/*
* Portable implementation of ltime() for any ISO-C platform where
* time_t behaves. (In practice, we've found that platforms such as
* Windows and Mac have needed their own specialised implementations.)
*/
#include <time.h>
#include <assert.h>
struct tm ltime(void)
{
time_t t;
time(&t);
assert (t != ((time_t)-1));
return *localtime(&t);
}