From 58031fc2c166e3909f13825e6d10d73547193417 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Fri, 18 Mar 2011 21:01:10 -0400 Subject: Fix 'readUtc' to work during DST --- src/c/urweb.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/c/urweb.c b/src/c/urweb.c index 9b926a99..d316d7be 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -3736,6 +3736,12 @@ uw_Basis_time *uw_Basis_readUtc(uw_context ctx, uw_Basis_string s) { r->seconds = mktime(&stm); r->microseconds = 0; + localtime_r(&r->seconds, &stm); + if (stm.tm_isdst == 1) { + ++stm.tm_hour; + r->seconds = mktime(&stm); + } + return r; } else -- cgit v1.2.3