timelib_sll timelib_get_current_offset(timelib_time *t)
{
timelib_time_offset *gmt_offset;
+ timelib_sll retval;
switch (t->zone_type) {
case TIMELIB_ZONETYPE_ABBR:
case TIMELIB_ZONETYPE_ID:
gmt_offset = timelib_get_time_zone_info(t->sse, t->tz_info);
- return gmt_offset->offset;
+ retval = gmt_offset->offset;
+ timelib_time_offset_dtor(gmt_offset);
+ return retval;
default:
return 0;
timelib_unixtime2local(t, time);
rs = timelib_astro_rise_set_altitude(t, longitude, latitude, altitude, altitude > -1 ? 1 : 0, &h_rise, &h_set, &rise, &set, &transit);
-
+ timelib_time_dtor(t);
+
if (rs != 0) {
RETURN_FALSE;
}
t2->sse = set;
add_assoc_long(return_value, "astronomical_twilight_end", timelib_date_to_int(t2, &dummy));
}
+ timelib_time_dtor(t);
+ timelib_time_dtor(t2);
}
/* }}} */
/*