46 (
strcmp((*one)->tz_info->name, (*two)->tz_info->name) == 0)
49 ((*one)->y > (*two)->y) ||
50 ((*one)->y == (*two)->y && (*one)->m > (*two)->m) ||
51 ((*one)->y == (*two)->y && (*one)->m == (*two)->m && (*one)->d > (*two)->d) ||
52 ((*one)->y == (*two)->y && (*one)->m == (*two)->m && (*one)->d == (*two)->d && (*one)->h > (*two)->h) ||
53 ((*one)->y == (*two)->y && (*one)->m == (*two)->m && (*one)->d == (*two)->d && (*one)->h == (*two)->h && (*one)->i > (*two)->i) ||
54 ((*one)->y == (*two)->y && (*one)->m == (*two)->m && (*one)->d == (*two)->d && (*one)->h == (*two)->h && (*one)->i == (*two)->i && (*one)->s > (*two)->s) ||
55 ((*one)->y == (*two)->y && (*one)->m == (*two)->m && (*one)->d == (*two)->d && (*one)->h == (*two)->h && (*one)->i == (*two)->i && (*one)->s == (*two)->s && (*one)->us > (*two)->us)
57 swap_times(one, two, rt);
64 ((*one)->sse > (*two)->sse) ||
65 ((*one)->sse == (*two)->sse && (*one)->us > (*two)->us)
67 swap_times(one, two, rt);
74 timelib_sll dst_corr = 0, dst_h_corr = 0, dst_m_corr = 0;
81 sort_old_to_new(&one, &two, rt);
84 dst_corr = two->
z - one->
z;
85 dst_h_corr = dst_corr / 3600;
86 dst_m_corr = (dst_corr % 3600) / 60;
88 rt->
y = two->
y - one->
y;
89 rt->
m = two->
m - one->
m;
90 rt->
d = two->
d - one->
d;
91 rt->
h = two->
h - one->
h;
92 rt->
i = two->
i - one->
i;
93 rt->
s = two->
s - one->
s;
94 rt->
us = two->
us - one->
us;
100 timelib_sll flipped = llabs((rt->
i * 60) + (rt->
s) - dst_corr);
103 rt->
s = flipped % 60;
110 if (one->
dst == 1 && two->
dst == 0) {
117 }
else if (one->
dst == 0 && two->
dst == 1) {
124 two->
sse >= trans_transition_time &&
134 dst_corr = one->
z - trans_offset;
136 if (two->
sse >= trans_transition_time - dst_corr && two->
sse < trans_transition_time) {
151 return timelib_diff_with_tzid(one, two);
157 sort_old_to_new(&one, &two, rt);
159 rt->
y = two->
y - one->
y;
160 rt->
m = two->
m - one->
m;
161 rt->
d = two->
d - one->
d;
162 rt->
h = two->
h - one->
h;
164 rt->
h = rt->
h + one->
dst;
167 rt->
h = rt->
h - two->
dst;
169 rt->
i = two->
i - one->
i;
170 rt->
s = two->
s - one->
s - two->
z + one->
z;
171 rt->
us = two->
us - one->
us;
187 double earliest_time, latest_time;
200 if (latest_time < earliest_time && days > 0) {
274 *b -= (
start - *
a - 1) / adj + 1;
275 *
a += adj * ((
start - *
a - 1) / adj + 1);
279 *
a -= adj * (*
a / adj);
311 if (interval->
us == 0) {
317 do_range_limit(0, 1000000, 1000000, &temp_interval->
us, &temp_interval->
s);
320 t->
us += temp_interval->
us * bias;
364 if (interval->
us == 0) {
370 do_range_limit(0, 1000000, 1000000, &temp_interval->
us, &temp_interval->
s);
373 t->
us -= temp_interval->
us * bias;
memset(ptr, 0, type->size)
timelib_time * timelib_sub(timelib_time *old_time, timelib_rel_time *interval)
timelib_time * timelib_add(timelib_time *old_time, timelib_rel_time *interval)
timelib_rel_time * timelib_diff(timelib_time *one, timelib_time *two)
int timelib_diff_days(timelib_time *one, timelib_time *two)
timelib_time * timelib_sub_wall(timelib_time *old_time, timelib_rel_time *interval)
timelib_time * timelib_add_wall(timelib_time *old_time, timelib_rel_time *interval)
int timelib_same_timezone(timelib_time *one, timelib_time *two)
int timelib_get_time_zone_offset_info(timelib_sll ts, timelib_tzinfo *tz, int32_t *offset, timelib_sll *transition_time, unsigned int *is_dst)
unsigned const char * end
unsigned int have_special_relative
unsigned int have_weekday_relative
unsigned int sse_uptodate
unsigned int have_relative
timelib_rel_time relative
timelib_time * timelib_time_clone(timelib_time *orig)
void timelib_hmsf_to_decimal_hour(int hour, int min, int sec, int us, double *h)
int timelib_time_compare(timelib_time *t1, timelib_time *t2)
timelib_rel_time * timelib_rel_time_clone(timelib_rel_time *rel)
void timelib_rel_time_dtor(timelib_rel_time *t)
timelib_sll timelib_hms_to_seconds(timelib_sll h, timelib_sll m, timelib_sll s)
timelib_rel_time * timelib_rel_time_ctor(void)
#define TIMELIB_ZONETYPE_ID
void timelib_update_ts(timelib_time *time, timelib_tzinfo *tzi)
void timelib_update_from_sse(timelib_time *tm)
struct _timelib_time timelib_time
void timelib_set_timezone(timelib_time *t, timelib_tzinfo *tz)
struct _timelib_rel_time timelib_rel_time
void timelib_do_rel_normalize(timelib_time *base, timelib_rel_time *rt)
timelib_sll timelib_epoch_days_from_time(timelib_time *time)
signed long long timelib_sll
void timelib_do_normalize(timelib_time *base)
strcmp(string $string1, string $string2)