* libexslt/date.c: fixed end-of-month problem in exsltDateCurrent
(#359246)
+Thu Oct 12 23:12:24 HKT 2006 William Brack <wbrack@mmm.com.hk>
+
+ * libexslt/date.c: fixed end-of-month problem in exsltDateCurrent
+ (#359246)
+
Thu Oct 12 14:39:37 CEST 2006 Daniel Veillard <daniel@veillard.com>
* libxslt/preproc.c: applied patch from Mike Hommey fixing 2
exsltDateCurrent (void)
{
struct tm *localTm, *gmTm;
- time_t secs;
+ time_t secs, gsecs;
#if HAVE_LOCALTIME_R
struct tm localTmS;
#endif
gmTm = gmtime(&secs);
#endif
ret->value.date.tz_flag = 0;
+#if 0
ret->value.date.tzo = (((ret->value.date.day * 1440) +
(ret->value.date.hour * 60) +
ret->value.date.min) -
((gmTm->tm_mday * 1440) + (gmTm->tm_hour * 60) +
gmTm->tm_min));
+#endif
+ gsecs = mktime(gmTm);
+ ret->value.date.tzo = (secs - gsecs) / 60;
return ret;
}