Lines Matching refs:tm
42 http_date_parse_RFC_850 (const char *s, struct tm * const tm) in http_date_parse_RFC_850() argument
56 struct tm tm_cur; in http_date_parse_RFC_850()
70 tm->tm_isdst = 0; in http_date_parse_RFC_850()
71 tm->tm_yday = 0; in http_date_parse_RFC_850()
72 tm->tm_wday = 0; in http_date_parse_RFC_850()
73 tm->tm_mon = 0; in http_date_parse_RFC_850()
81 } while (++tm->tm_wday < 7); in http_date_parse_RFC_850()
82 if (7 == tm->tm_wday) return NULL; in http_date_parse_RFC_850()
90 tm->tm_mday = tens[(s[2]-'0')] + (s[3]-'0'); in http_date_parse_RFC_850()
97 } while (++tm->tm_mon < 12); in http_date_parse_RFC_850()
98 if (12 == tm->tm_mon) return NULL; in http_date_parse_RFC_850()
102 tm->tm_year = tens[(s[9]-'0')] + (s[10]-'0') + tm_year_base; in http_date_parse_RFC_850()
103 if (tm->tm_year > tm_year_cur + 50) tm->tm_year -= 100; in http_date_parse_RFC_850()
107 tm->tm_hour = tens[(s[12]-'0')] + (s[13]-'0'); in http_date_parse_RFC_850()
111 tm->tm_min = tens[(s[15]-'0')] + (s[16]-'0'); in http_date_parse_RFC_850()
115 tm->tm_sec = tens[(s[18]-'0')] + (s[19]-'0'); in http_date_parse_RFC_850()
126 http_date_parse_asctime (const char * const s, struct tm * const tm) in http_date_parse_asctime() argument
131 tm->tm_isdst = 0; in http_date_parse_asctime()
132 tm->tm_yday = 0; in http_date_parse_asctime()
133 tm->tm_wday = 0; in http_date_parse_asctime()
134 tm->tm_mon = 0; in http_date_parse_asctime()
142 } while (++tm->tm_wday < 7); in http_date_parse_asctime()
143 if (7 == tm->tm_wday) return NULL; in http_date_parse_asctime()
150 } while (++tm->tm_mon < 12); in http_date_parse_asctime()
151 if (12 == tm->tm_mon) return NULL; in http_date_parse_asctime()
156 tm->tm_mday = (s[8] == ' ' ? 0 : tens[(s[8]-'0')]) + (s[9]-'0'); in http_date_parse_asctime()
160 tm->tm_hour = tens[(s[11]-'0')] + (s[12]-'0'); in http_date_parse_asctime()
164 tm->tm_min = tens[(s[14]-'0')] + (s[15]-'0'); in http_date_parse_asctime()
168 tm->tm_sec = tens[(s[17]-'0')] + (s[18]-'0'); in http_date_parse_asctime()
172 tm->tm_year =(tens[(s[20]-'0')] + (s[21]-'0'))*100 in http_date_parse_asctime()
180 http_date_parse_IMF_fixdate (const char * const s, struct tm * const tm) in http_date_parse_IMF_fixdate() argument
185 tm->tm_isdst = 0; in http_date_parse_IMF_fixdate()
186 tm->tm_yday = 0; in http_date_parse_IMF_fixdate()
187 tm->tm_wday = 0; in http_date_parse_IMF_fixdate()
188 tm->tm_mon = 0; in http_date_parse_IMF_fixdate()
196 } while (++tm->tm_wday < 7); in http_date_parse_IMF_fixdate()
197 if (7 == tm->tm_wday) return NULL; in http_date_parse_IMF_fixdate()
202 tm->tm_mday = tens[(s[5]-'0')] + (s[6]-'0'); in http_date_parse_IMF_fixdate()
209 } while (++tm->tm_mon < 12); in http_date_parse_IMF_fixdate()
210 if (12 == tm->tm_mon) return NULL; in http_date_parse_IMF_fixdate()
214 tm->tm_year =(tens[(s[12]-'0')] + (s[13]-'0'))*100 in http_date_parse_IMF_fixdate()
219 tm->tm_hour = tens[(s[17]-'0')] + (s[18]-'0'); in http_date_parse_IMF_fixdate()
223 tm->tm_min = tens[(s[20]-'0')] + (s[21]-'0'); in http_date_parse_IMF_fixdate()
227 tm->tm_sec = tens[(s[23]-'0')] + (s[24]-'0'); in http_date_parse_IMF_fixdate()
238 struct tm * const tm) in http_date_str_to_tm() argument
259 return http_date_parse_IMF_fixdate(s, tm); in http_date_str_to_tm()
261 return http_date_parse_RFC_850(s, tm); in http_date_str_to_tm()
263 return http_date_parse_asctime(s, tm); in http_date_str_to_tm()
271 struct tm tm; in http_date_time_to_str() local
273 return (__builtin_expect( (NULL != gmtime64_r(&t, &tm)), 1)) in http_date_time_to_str()
274 ? (uint32_t)strftime(s, sz, fmt, &tm) in http_date_time_to_str()
283 struct tm ifmodtm; in http_date_if_modified_since()