source: filezilla/trunk/fuentes/src/putty/time.c @ 130

Last change on this file since 130 was 130, checked in by jrpelegrina, 4 years ago

First release to xenial

File size: 366 bytes
Line 
1/*
2 * Portable implementation of ltime() for any ISO-C platform where
3 * time_t behaves. (In practice, we've found that platforms such as
4 * Windows and Mac have needed their own specialised implementations.)
5 */
6
7#include <time.h>
8#include <assert.h>
9
10struct tm ltime(void)
11{
12    time_t t;
13    time(&t);
14    assert (t != ((time_t)-1));
15    return *localtime(&t);
16}
Note: See TracBrowser for help on using the repository browser.