about summary refs log tree commit diff
path: root/src/time/localtime.c
blob: abd5e84d2a6fa87efb66b2f5485fb743ce5253ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#include <time.h>

#include "__time.h"

struct tm *localtime(const time_t *t)
{
	static struct tm tm;
	__tzset();
	__time_to_tm(*t - __timezone, &tm);
	tm.tm_isdst = -1;
	return __dst_adjust(&tm);
}