Lines Matching refs:tm
14 struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
16 struct tm *ts = NULL;
31 struct tm data, *ts2 = &data;
37 memcpy(result, ts2, sizeof(struct tm));
53 memcpy(result, ts, sizeof(struct tm));
60 * Take a tm structure and add an offset to it. This avoids any OS issues
69 static int julian_adj(const struct tm *tm, int off_day, long offset_sec,
72 int OPENSSL_gmtime_adj(struct tm *tm, int off_day, long offset_sec)
78 if (!julian_adj(tm, off_day, offset_sec, &time_jd, &time_sec))
88 /* Update tm structure */
90 tm->tm_year = time_year - 1900;
91 tm->tm_mon = time_month - 1;
92 tm->tm_mday = time_day;
94 tm->tm_hour = time_sec / 3600;
95 tm->tm_min = (time_sec / 60) % 60;
96 tm->tm_sec = time_sec % 60;
103 const struct tm *from, const struct tm *to)
132 /* Convert tm structure and offset into julian day and seconds */
133 static int julian_adj(const struct tm *tm, int off_day, long offset_sec,
145 offset_hms += tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec;
159 time_year = tm->tm_year + 1900;
160 time_month = tm->tm_mon + 1;
161 time_day = tm->tm_mday;