Lines Matching full:tm
101 struct tm tm; in cdf_timestamp_to_timespec() local
111 tm.tm_sec = CAST(int, t % 60); in cdf_timestamp_to_timespec()
114 tm.tm_min = CAST(int, t % 60); in cdf_timestamp_to_timespec()
117 tm.tm_hour = CAST(int, t % 24); in cdf_timestamp_to_timespec()
121 tm.tm_year = CAST(int, CDF_BASE_YEAR + (t / 365)); in cdf_timestamp_to_timespec()
123 rdays = cdf_getdays(tm.tm_year); in cdf_timestamp_to_timespec()
125 tm.tm_mday = cdf_getday(tm.tm_year, CAST(int, t)); in cdf_timestamp_to_timespec()
126 tm.tm_mon = cdf_getmonth(tm.tm_year, CAST(int, t)); in cdf_timestamp_to_timespec()
127 tm.tm_wday = 0; in cdf_timestamp_to_timespec()
128 tm.tm_yday = 0; in cdf_timestamp_to_timespec()
129 tm.tm_isdst = 0; in cdf_timestamp_to_timespec()
131 tm.tm_gmtoff = 0; in cdf_timestamp_to_timespec()
134 tm.tm_zone = UTC; in cdf_timestamp_to_timespec()
136 tm.tm_year -= 1900; in cdf_timestamp_to_timespec()
137 ts->tv_sec = mktime(&tm); in cdf_timestamp_to_timespec()
154 struct tm tm; in cdf_timespec_to_timestamp() local
155 if (gmtime_r(&ts->ts_sec, &tm) == NULL) { in cdf_timespec_to_timestamp()
160 *t += tm.tm_sec; in cdf_timespec_to_timestamp()
161 *t += tm.tm_min * 60; in cdf_timespec_to_timestamp()
162 *t += tm.tm_hour * 60 * 60; in cdf_timespec_to_timestamp()
163 *t += tm.tm_mday * 60 * 60 * 24; in cdf_timespec_to_timestamp()