src/server/util/date.c

changeset 415
d938228c382e
parent 44
3da1f7b6847f
equal deleted inserted replaced
414:99a34860c105 415:d938228c382e
54 "Oct", 54 "Oct",
55 "Nov", 55 "Nov",
56 "Dec" 56 "Dec"
57 }; 57 };
58 58
59 sstr_t date_format_http(time_t t, pool_handle_t *pool) { 59 cxmutstr date_format_http(time_t t, pool_handle_t *pool) {
60 sstr_t d; 60 cxmutstr d;
61 d.ptr = NULL; 61 d.ptr = NULL;
62 d.length = 0; 62 d.length = 0;
63 63
64 struct tm date; 64 struct tm date;
65 gmtime_r(&t, &date); 65 gmtime_r(&t, &date);
81 d.ptr = str; 81 d.ptr = str;
82 82
83 return d; 83 return d;
84 } 84 }
85 85
86 sstr_t date_format_iso8601(time_t t, pool_handle_t *pool) { 86 cxmutstr date_format_iso8601(time_t t, pool_handle_t *pool) {
87 sstr_t d; 87 cxmutstr d;
88 d.ptr = NULL; 88 d.ptr = NULL;
89 d.length = 0; 89 d.length = 0;
90 90
91 struct tm date; 91 struct tm date;
92 gmtime_r(&t, &date); 92 gmtime_r(&t, &date);

mercurial