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

#include <sys/types.h>
#include <skalibs/uint32.h>
#include <skalibs/djbtime.h>

size_t localtmn_fmt (char *s, localtmn_t const *l)
{
  char *p = s ;
  p += localtm_fmt(p, &l->tm) ; *p++ = '.' ;
  uint320_fmt(p, l->nano, 9) ; p += 9 ;
  return p - s ;
}