Lines Matching refs:tm

57 void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts)  in timelib_unixtime2gmt()  argument
62 timelib_unixtime2date(ts, &tm->y, &tm->m, &tm->d); in timelib_unixtime2gmt()
72 tm->h = hours; in timelib_unixtime2gmt()
73 tm->i = minutes; in timelib_unixtime2gmt()
74 tm->s = seconds; in timelib_unixtime2gmt()
75 tm->z = 0; in timelib_unixtime2gmt()
76 tm->dst = 0; in timelib_unixtime2gmt()
77 tm->sse = ts; in timelib_unixtime2gmt()
78 tm->sse_uptodate = 1; in timelib_unixtime2gmt()
79 tm->tim_uptodate = 1; in timelib_unixtime2gmt()
80 tm->is_localtime = 0; in timelib_unixtime2gmt()
83 void timelib_update_from_sse(timelib_time *tm) in timelib_update_from_sse() argument
86 int z = tm->z; in timelib_update_from_sse()
87 signed int dst = tm->dst; in timelib_update_from_sse()
89 sse = tm->sse; in timelib_update_from_sse()
91 switch (tm->zone_type) { in timelib_update_from_sse()
94 timelib_unixtime2gmt(tm, tm->sse + tm->z + (tm->dst * 3600)); in timelib_update_from_sse()
102 timelib_get_time_zone_offset_info(tm->sse, tm->tz_info, &offset, NULL, NULL); in timelib_update_from_sse()
103 timelib_unixtime2gmt(tm, tm->sse + offset); in timelib_update_from_sse()
109 timelib_unixtime2gmt(tm, tm->sse); in timelib_update_from_sse()
113 tm->sse = sse; in timelib_update_from_sse()
114 tm->is_localtime = 1; in timelib_update_from_sse()
115 tm->have_zone = 1; in timelib_update_from_sse()
116 tm->z = z; in timelib_update_from_sse()
117 tm->dst = dst; in timelib_update_from_sse()
120 void timelib_unixtime2local(timelib_time *tm, timelib_sll ts) in timelib_unixtime2local() argument
123 timelib_tzinfo *tz = tm->tz_info; in timelib_unixtime2local()
125 switch (tm->zone_type) { in timelib_unixtime2local()
128 int z = tm->z; in timelib_unixtime2local()
129 signed int dst = tm->dst; in timelib_unixtime2local()
131 timelib_unixtime2gmt(tm, ts + tm->z + (tm->dst * 3600)); in timelib_unixtime2local()
133 tm->sse = ts; in timelib_unixtime2local()
134 tm->z = z; in timelib_unixtime2local()
135 tm->dst = dst; in timelib_unixtime2local()
141 timelib_unixtime2gmt(tm, ts + gmt_offset->offset); in timelib_unixtime2local()
144 tm->sse = ts; in timelib_unixtime2local()
145 tm->dst = gmt_offset->is_dst; in timelib_unixtime2local()
146 tm->z = gmt_offset->offset; in timelib_unixtime2local()
147 tm->tz_info = tz; in timelib_unixtime2local()
149 timelib_time_tz_abbr_update(tm, gmt_offset->abbr); in timelib_unixtime2local()
154 tm->is_localtime = 0; in timelib_unixtime2local()
155 tm->have_zone = 0; in timelib_unixtime2local()
159 tm->is_localtime = 1; in timelib_unixtime2local()
160 tm->have_zone = 1; in timelib_unixtime2local()