Lines Matching refs:tm
38 lws_http_date_render(char *buf, size_t len, const struct tm *tm)
40 const char *w = s + 36 + (3 * tm->tm_wday), *m = s + (3 * tm->tm_mon);
46 w[0], w[1], w[2], tm->tm_mday, m[0], m[1], m[2],
47 1900 + tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec);
57 struct tm tmp;
58 struct tm *tm = gmtime_r(t, &tmp);
60 struct tm *tm = gmtime(t);
62 if (!tm)
65 if (lws_http_date_render(buf, len, tm))
72 lws_http_date_parse(const char *b, size_t len, struct tm *tm)
90 memset(tm, 0, sizeof(*tm));
96 tm->tm_wday++;
105 tm->tm_mon++;
110 tm->tm_mday = atoi(b + 5);
114 tm->tm_year = n - 1900;
119 tm->tm_hour = n;
124 tm->tm_min = n;
129 tm->tm_sec = n;
137 struct tm tm;
139 if (lws_http_date_parse(b, len, &tm))
143 *t = _mkgmtime(&tm);
146 *t = timegm(&tm);
149 *t = mktime(&tm);