Lines Matching refs:tm
170 static time_t mkgmtime(struct tm *tm) in mkgmtime() argument
174 return ((((((tm->tm_year - 70) * 365) + mdays[tm->tm_mon] + tm->tm_mday-1 + in mkgmtime()
175 (tm->tm_year-68-1+(tm->tm_mon>=2))/4) * 24) + tm->tm_hour) * 60 + in mkgmtime()
176 tm->tm_min) * 60 + tm->tm_sec; in mkgmtime()
180 struct tm tm; in date_from_ISO8601() local
206 tm.tm_isdst = -1; in date_from_ISO8601()
211 tm.tm_year = 0; in date_from_ISO8601()
214 tm.tm_year += (text[i]-'0')*n; in date_from_ISO8601()
218 tm.tm_mon = 0; in date_from_ISO8601()
221 tm.tm_mon += (text[i+4]-'0')*n; in date_from_ISO8601()
224 tm.tm_mon --; in date_from_ISO8601()
225 if(tm.tm_mon < 0 || tm.tm_mon > 11) { in date_from_ISO8601()
230 tm.tm_mday = 0; in date_from_ISO8601()
233 tm.tm_mday += (text[i+6]-'0')*n; in date_from_ISO8601()
238 tm.tm_hour = 0; in date_from_ISO8601()
241 tm.tm_hour += (text[i+9]-'0')*n; in date_from_ISO8601()
246 tm.tm_min = 0; in date_from_ISO8601()
249 tm.tm_min += (text[i+12]-'0')*n; in date_from_ISO8601()
254 tm.tm_sec = 0; in date_from_ISO8601()
257 tm.tm_sec += (text[i+15]-'0')*n; in date_from_ISO8601()
261 tm.tm_year -= 1900; in date_from_ISO8601()
263 *value = mkgmtime(&tm); in date_from_ISO8601()
270 struct tm *tm, tmbuf; in date_to_ISO8601() local
271 tm = php_gmtime_r(&value, &tmbuf); in date_to_ISO8601()
272 if (!tm) { in date_to_ISO8601()
276 return strftime (buf, length, "%Y-%m-%dT%H:%M:%SZ", tm); in date_to_ISO8601()
278 return strftime(buf, length, "%Y%m%dT%H:%M:%SZ", tm); in date_to_ISO8601()