summaryrefslogtreecommitdiff
path: root/src/libstddjb/localtmn_from_sysclock.c
blob: 08e64b71e7d001f9505142b7d2311eac5e7f3ed0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <skalibs/tai.h>
#include <skalibs/djbtime.h>

int localtmn_from_sysclock (localtmn_t *l, tain_t const *a, int tz)
{
  struct tm t ;
  if (!localtm_from_sysclock(&t, a->sec.x, tz)) return 0 ;
  l->tm = t ;
  l->nano = a->nano ;
  return 1 ;
}