summaryrefslogtreecommitdiff
path: root/lib/libc/time/localtime_r.c
blob: 04c0450985f2ab312846190ecbed5b77546a3eb5 (plain)
1
2
3
4
5
6
7
#include <time.h> // for gmtime_r, time_t, localtime_r, timezone

struct tm *localtime_r(const time_t *restrict timer, struct tm *restrict result)
{
	time_t local = *timer - timezone;
	return gmtime_r(&local, result);
}