/*
* 2472692 adjusts the days for Unix epoch. It is calculated as
* (365.2425 * (4800 + 1970))
+ *
+ * We REMOVE the time zone offset in order to get internal unix times in UTC.
*/
return fr_unix_time_from_sec((((days - 2472692) * 86400) + (tm->tm_hour * 3600) +
(tm->tm_min * 60) + tm->tm_sec) - tm->tm_gmtoff);
if (*tail == '-') tz *= -1;
done:
- tm->tm_gmtoff = tz;
+ /*
+ * We REMOVE the time zone offset in order to get internal unix times in UTC.
+ */
+ tm->tm_gmtoff = -tz;
*date = fr_unix_time_add(fr_unix_time_from_tm(tm), fr_time_delta_wrap(subseconds));
return 0;
}