Lines Matching refs:rt
29 static void swap_times(timelib_time **one, timelib_time **two, timelib_rel_time *rt) in swap_times() argument
36 rt->invert = 1; in swap_times()
39 static void sort_old_to_new(timelib_time **one, timelib_time **two, timelib_rel_time *rt) in sort_old_to_new() argument
57 swap_times(one, two, rt); in sort_old_to_new()
67 swap_times(one, two, rt); in sort_old_to_new()
73 timelib_rel_time *rt; in timelib_diff_with_tzid() local
78 rt = timelib_rel_time_ctor(); in timelib_diff_with_tzid()
79 rt->invert = 0; in timelib_diff_with_tzid()
81 sort_old_to_new(&one, &two, rt); in timelib_diff_with_tzid()
88 rt->y = two->y - one->y; in timelib_diff_with_tzid()
89 rt->m = two->m - one->m; in timelib_diff_with_tzid()
90 rt->d = two->d - one->d; in timelib_diff_with_tzid()
91 rt->h = two->h - one->h; in timelib_diff_with_tzid()
92 rt->i = two->i - one->i; in timelib_diff_with_tzid()
93 rt->s = two->s - one->s; in timelib_diff_with_tzid()
94 rt->us = two->us - one->us; in timelib_diff_with_tzid()
96 rt->days = timelib_diff_days(one, two); in timelib_diff_with_tzid()
100 timelib_sll flipped = llabs((rt->i * 60) + (rt->s) - dst_corr); in timelib_diff_with_tzid()
101 rt->h = flipped / SECS_PER_HOUR; in timelib_diff_with_tzid()
102 rt->i = (flipped - rt->h * SECS_PER_HOUR) / 60; in timelib_diff_with_tzid()
103 rt->s = flipped % 60; in timelib_diff_with_tzid()
105 rt->invert = 1 - rt->invert; in timelib_diff_with_tzid()
108 timelib_do_rel_normalize(rt->invert ? one : two, rt); in timelib_diff_with_tzid()
113 rt->h -= dst_h_corr; in timelib_diff_with_tzid()
114 rt->i -= dst_m_corr; in timelib_diff_with_tzid()
127 rt->h -= dst_h_corr; in timelib_diff_with_tzid()
128 rt->i -= dst_m_corr; in timelib_diff_with_tzid()
137 rt->d--; in timelib_diff_with_tzid()
138 rt->h = 24; in timelib_diff_with_tzid()
143 return rt; in timelib_diff_with_tzid()
148 timelib_rel_time *rt; in timelib_diff() local
154 rt = timelib_rel_time_ctor(); in timelib_diff()
155 rt->invert = 0; in timelib_diff()
157 sort_old_to_new(&one, &two, rt); in timelib_diff()
159 rt->y = two->y - one->y; in timelib_diff()
160 rt->m = two->m - one->m; in timelib_diff()
161 rt->d = two->d - one->d; in timelib_diff()
162 rt->h = two->h - one->h; in timelib_diff()
164 rt->h = rt->h + one->dst; in timelib_diff()
167 rt->h = rt->h - two->dst; in timelib_diff()
169 rt->i = two->i - one->i; in timelib_diff()
170 rt->s = two->s - one->s - two->z + one->z; in timelib_diff()
171 rt->us = two->us - one->us; in timelib_diff()
173 rt->days = timelib_diff_days(one, two); in timelib_diff()
175 timelib_do_rel_normalize(rt->invert ? one : two, rt); in timelib_diff()
177 return rt; in timelib_diff()