diff options
author | Adam Chlipala <adam@chlipala.net> | 2011-03-18 21:01:10 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2011-03-18 21:01:10 -0400 |
commit | 287dc45a51d5a92401d8ee3ad038086b15572037 (patch) | |
tree | 7fa8ae129799a13cfebff40e646a33b4f6a04ff1 /src | |
parent | 8b0f32ba85c18581cc58f588019fd89517741e0e (diff) |
Fix 'readUtc' to work during DST
Diffstat (limited to 'src')
-rw-r--r-- | src/c/urweb.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 |