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

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

unsigned int 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 ;
}