Lines Matching defs:tm
192 struct tm tm;
203 localtime_or_gmtime_r(&sec, &tm, utc);
206 k = strftime(buf, l, "%a %Y-%m-%d %H:%M:%S", &tm);
208 k = strftime(buf, l, "%a %Y-%m-%d %H:%M:%S %Z", &tm);
214 if (strftime(buf + strlen(buf), l - strlen(buf), " %Z", &tm) <= 0)
465 struct tm tm, copy;
540 assert_se(localtime_or_gmtime_r(&x, &tm, utc));
541 tm.tm_isdst = -1;
544 tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
548 tm.tm_mday --;
549 tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
553 tm.tm_mday ++;
554 tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
574 copy = tm;
575 k = strptime(t, "%y-%m-%d %H:%M:%S", &tm);
583 tm = copy;
584 k = strptime(t, "%Y-%m-%d %H:%M:%S", &tm);
592 tm = copy;
593 k = strptime(t, "%y-%m-%d %H:%M", &tm);
595 tm.tm_sec = 0;
599 tm = copy;
600 k = strptime(t, "%Y-%m-%d %H:%M", &tm);
602 tm.tm_sec = 0;
606 tm = copy;
607 k = strptime(t, "%y-%m-%d", &tm);
609 tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
613 tm = copy;
614 k = strptime(t, "%Y-%m-%d", &tm);
616 tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
620 tm = copy;
621 k = strptime(t, "%H:%M:%S", &tm);
629 tm = copy;
630 k = strptime(t, "%H:%M", &tm);
632 tm.tm_sec = 0;
655 x = mktime_or_timegm(&tm, utc);
659 if (weekday >= 0 && tm.tm_wday != weekday)
1096 time_t mktime_or_timegm(struct tm *tm, bool utc) {
1097 return utc ? timegm(tm) : mktime(tm);
1100 struct tm *localtime_or_gmtime_r(const time_t *t, struct tm *tm, bool utc) {
1101 return utc ? gmtime_r(t, tm) : localtime_r(t, tm);