Lines Matching refs:tm

91 static char const *abbr(struct tm const *);
92 static intmax_t delta(struct tm *, struct tm *);
93 static void dumptime(struct tm const *);
96 static void showextrema(timezone_t, char *, time_t, struct tm *, time_t);
97 static void showtrans(char const *, struct tm const *, time_t, char const *,
189 static struct tm *
190 gmtime_r(time_t *tp, struct tm *tmp) in gmtime_r()
192 struct tm *r = gmtime(tp); in gmtime_r()
216 static struct tm *
217 localtime_r(time_t *tp, struct tm *tmp) in localtime_r()
219 struct tm *r = localtime(tp); in localtime_r()
230 static struct tm *
231 localtime_rz(ATTRIBUTE_MAYBE_UNUSED timezone_t rz, time_t *tp, struct tm *tmp) in localtime_rz()
240 mktime_z(timezone_t tz, struct tm *tmp) in mktime_z()
350 static struct tm *
351 my_gmtime_r(time_t *tp, struct tm *tmp) in my_gmtime_r()
360 static struct tm *
361 my_localtime_rz(timezone_t tz, time_t *tp, struct tm *tmp) in my_localtime_rz()
365 struct tm tm; in my_localtime_rz() local
368 tm = *tmp; in my_localtime_rz()
369 t = mktime_z(tz, &tm); in my_localtime_rz()
424 saveabbr(char **buf, ptrdiff_t *bufalloc, struct tm const *tmp) in saveabbr()
602 struct tm tm, newtm; in main() local
619 if (my_localtime_rz(tz, &t, &tm) == NULL in main()
628 tm_ok = my_localtime_rz(tz, &t, &tm) != NULL; in main()
630 ab = saveabbr(&abbrev, &abbrevsize, &tm); in main()
632 showtrans("\nTZ=%f", &tm, t, ab, argv[i]); in main()
633 showtrans("-\t-\t%Q", &tm, t, ab, argv[i]); in main()
642 struct tm *newtmp = localtime_rz(tz, &newt, &newtm); in main()
645 || (ab && (delta(&newtm, &tm) != newt - t in main()
646 || newtm.tm_isdst != tm.tm_isdst in main()
663 tm = newtm; in main()
670 struct tm *tmp = my_localtime_rz(tz, &t, &tm); in main()
740 struct tm lotm; in hunt()
741 struct tm tm; in hunt() local
758 tm_ok = my_localtime_rz(tz, &t, &tm) != NULL; in hunt()
761 || (ab && tm.tm_isdst == lotm.tm_isdst in hunt()
762 && delta(&tm, &lotm) == t - lot in hunt()
763 && strcmp(abbr(&tm), ab) == 0))) { in hunt()
766 lotm = tm; in hunt()
777 delta_nonneg(struct tm *newp, struct tm *oldp) in delta_nonneg()
796 delta(struct tm *newp, struct tm *oldp) in delta()
807 adjusted_yday(struct tm const *a, struct tm const *b) in adjusted_yday()
824 gmtoff(struct tm const *a, ATTRIBUTE_MAYBE_UNUSED time_t *t, in gmtoff()
825 ATTRIBUTE_MAYBE_UNUSED struct tm const *b) in gmtoff()
830 struct tm tm; in gmtoff()
832 b = my_gmtime_r(t, &tm); in gmtoff()
850 register struct tm * tmp; in show()
851 register struct tm * gmtmp; in show()
852 struct tm tm, gmtm; in show() local
866 tmp = my_localtime_rz(tz, &t, &tm); in show()
893 showextrema(timezone_t tz, char *zone, time_t lo, struct tm *lotmp, time_t hi) in showextrema()
895 struct tm localtm[2], gmtm[2]; in showextrema()
975 format_local_time(char *buf, ptrdiff_t size, struct tm const *tm) in format_local_time() argument
977 int ss = tm->tm_sec, mm = tm->tm_min, hh = tm->tm_hour; in format_local_time()
998 format_utc_offset(char *buf, ptrdiff_t size, struct tm const *tm, time_t t) in format_utc_offset() argument
1000 long off = gmtoff(tm, &t, NULL); in format_utc_offset()
1003 && (*abbr(tm) == '-' || strcmp(abbr(tm), "zzz") == 0))) in format_utc_offset()
1070 struct tm const *tm, time_t t, char const *ab, char const *zone_name) in istrftime() argument
1090 formatted_len = strftime(b, s, f_prefix_copy, tm); in istrftime()
1104 formatted_len = format_local_time(b, s, tm); in istrftime()
1109 int offlen = format_utc_offset(b, s, tm, t); in istrftime()
1130 = (tm->tm_isdst in istrftime()
1131 ? my_snprintf(b, s, &"\t\t%d"[show_abbr], tm->tm_isdst) in istrftime()
1147 showtrans(char const *time_fmt, struct tm const *tm, time_t t, char const *ab, in showtrans() argument
1150 if (!tm) { in showtrans()
1158 while (! istrftime(buf, size, time_fmt, tm, t, ab, zone_name)) { in showtrans()
1169 abbr(struct tm const *tmp) in abbr()
1228 dumptime(register const struct tm *timeptr) in dumptime()