Lines Matching refs:tm
170 struct tm tmbuf;
484 * works with tm.tm_year (ie: rel to 1900)
794 struct tm tm = {.tm_sec = 0};
795 struct tm otm;
798 tm.tm_sec = Seconds;
799 tm.tm_min = Minutes;
800 tm.tm_hour = ((Hours == 12 && Meridian != MER24) ? 0 : Hours) +
803 tm.tm_mday = Day;
804 tm.tm_mon = Month - 1;
805 tm.tm_year = Year - 1900;
806 if ((time_t)tm.tm_year + 1900 != Year) {
812 case DSTon: tm.tm_isdst = 1; break;
813 case DSToff: tm.tm_isdst = 0; break;
814 default: tm.tm_isdst = -1; break;
816 otm = tm;
817 result = mktime(&tm);
820 tm.tm_isdst = 0; /* hence cannot be summer time */
821 otm = tm;
823 result = mktime_z(NULL, &tm);
842 #define TM_NE(fld) (otm.tm_ ## fld != tm.tm_ ## fld)
845 /* mktime() "corrected" our tm, so it must have been invalid */
863 struct tm tm;
865 if (localtime_r(&Start, &tm) == NULL)
867 StartDay = (tm.tm_hour + 1) % 24;
869 if (localtime_r(&Future, &tm) == NULL)
871 FutureDay = (tm.tm_hour + 1) % 24;
884 struct tm tm;
889 if (localtime_r(&now, &tm) == NULL)
898 change = SECSPERDAY * ((DayNumber - tm.tm_wday + 7) % 7);
920 struct tm tm;
937 if (localtime_r(&Start, &tm) == NULL)
940 if (RelMonth >= LLONG_MAX - 12*((time_t)tm.tm_year + 1900) - tm.tm_mon) {
944 Month = 12 * (tm.tm_year + 1900) + tm.tm_mon + RelMonth;
945 tm.tm_year = (Month / 12) - 1900;
947 if (((time_t)tm.tm_year + 1900) != Month/12) {
951 tm.tm_mon = Month % 12;
952 if (tm.tm_mday > (Day = DaysInMonth[tm.tm_mon] +
953 ((tm.tm_mon==1) ? isleap(tm.tm_year) : 0)))
954 tm.tm_mday = Day;
956 Then = mktime(&tm);
1147 struct tm local, *tm;
1166 if ((tm = localtime_r(now, &local)) == NULL)
1173 * not other fields of struct tm.
1176 if ((tm = gmtime_r(&fake, &local)) == NULL)
1179 param.yyYear = tm->tm_year + 1900;
1180 param.yyMonth = tm->tm_mon + 1;
1181 param.yyDay = tm->tm_mday;
1298 Start -= ((tm->tm_hour * 60L + tm->tm_min) * 60L) + tm->tm_sec;