Lines Matching full: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)
192 struct tm *r = gmtime(tp);
216 static struct tm *
217 localtime_r(time_t *tp, struct tm *tmp)
219 struct tm *r = localtime(tp);
230 static struct tm *
231 localtime_rz(ATTRIBUTE_MAYBE_UNUSED timezone_t rz, time_t *tp, struct tm *tmp)
240 mktime_z(timezone_t tz, struct tm *tmp)
350 static struct tm *
351 my_gmtime_r(time_t *tp, struct tm *tmp)
360 static struct tm *
361 my_localtime_rz(timezone_t tz, time_t *tp, struct tm *tmp)
365 struct tm tm;
368 tm = *tmp;
369 t = mktime_z(tz, &tm);
424 saveabbr(char **buf, ptrdiff_t *bufalloc, struct tm const *tmp)
602 struct tm tm, newtm;
619 if (my_localtime_rz(tz, &t, &tm) == NULL
628 tm_ok = my_localtime_rz(tz, &t, &tm) != NULL;
630 ab = saveabbr(&abbrev, &abbrevsize, &tm);
632 showtrans("\nTZ=%f", &tm, t, ab, argv[i]);
633 showtrans("-\t-\t%Q", &tm, t, ab, argv[i]);
642 struct tm *newtmp = localtime_rz(tz, &newt, &newtm);
645 || (ab && (delta(&newtm, &tm) != newt - t
646 || newtm.tm_isdst != tm.tm_isdst
663 tm = newtm;
670 struct tm *tmp = my_localtime_rz(tz, &t, &tm);
740 struct tm lotm;
741 struct tm tm;
758 tm_ok = my_localtime_rz(tz, &t, &tm) != NULL;
761 || (ab && tm.tm_isdst == lotm.tm_isdst
762 && delta(&tm, &lotm) == t - lot
763 && strcmp(abbr(&tm), ab) == 0))) {
766 lotm = tm;
777 delta_nonneg(struct tm *newp, struct tm *oldp)
796 delta(struct tm *newp, struct tm *oldp)
807 adjusted_yday(struct tm const *a, struct tm const *b)
824 gmtoff(struct tm const *a, ATTRIBUTE_MAYBE_UNUSED time_t *t,
825 ATTRIBUTE_MAYBE_UNUSED struct tm const *b)
830 struct tm tm;
832 b = my_gmtime_r(t, &tm);
850 register struct tm * tmp;
851 register struct tm * gmtmp;
852 struct tm tm, gmtm;
866 tmp = my_localtime_rz(tz, &t, &tm);
893 showextrema(timezone_t tz, char *zone, time_t lo, struct tm *lotmp, time_t hi)
895 struct tm localtm[2], gmtm[2];
967 /* Store into BUF, of size SIZE, a formatted local time taken from *TM.
975 format_local_time(char *buf, ptrdiff_t size, struct tm const *tm)
977 int ss = tm->tm_sec, mm = tm->tm_min, hh = tm->tm_hour;
986 localtime *TM corresponding to time T. Use ISO 8601 format
998 format_utc_offset(char *buf, ptrdiff_t size, struct tm const *tm, time_t t)
1000 long off = gmtoff(tm, &t, NULL);
1003 && (*abbr(tm) == '-' || strcmp(abbr(tm), "zzz") == 0)))
1055 TM is the broken-down time, T the seconds count, AB the time zone
1070 struct tm const *tm, time_t t, char const *ab, char const *zone_name)
1090 formatted_len = strftime(b, s, f_prefix_copy, tm);
1104 formatted_len = format_local_time(b, s, tm);
1109 int offlen = format_utc_offset(b, s, tm, t);
1130 = (tm->tm_isdst
1131 ? my_snprintf(b, s, &"\t\t%d"[show_abbr], tm->tm_isdst)
1147 showtrans(char const *time_fmt, struct tm const *tm, time_t t, char const *ab,
1150 if (!tm) {
1158 while (! istrftime(buf, size, time_fmt, tm, t, ab, zone_name)) {
1169 abbr(struct tm const *tmp)
1228 dumptime(register const struct tm *timeptr)