blob: ca4cdd95abf48086920f9a649566df555e2e2140 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/* ISC license. */
#include <time.h>
#include <skalibs/tai.h>
#include <skalibs/djbtime.h>
#include <tipidee/response.h>
size_t tipidee_response_header_date_fmt (char *s, size_t max, tain const *stamp)
{
struct tm tm ;
if (!localtm_from_tai(&tm, tain_secp(stamp), 0)) return 0 ;
return strftime(s, max, "%a, %d %b %Y %T GMT", &tm) ;
}
|