Mercurial > urweb
changeset 1439:6ff10428de4a
Fix 'readUtc' to work during DST
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 18 Mar 2011 21:01:10 -0400 |
parents | b6df00ed536c |
children | 6064ddd90ca6 |
files | src/c/urweb.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/c/urweb.c Fri Mar 18 09:46:24 2011 -0400 +++ b/src/c/urweb.c Fri Mar 18 21:01:10 2011 -0400 @@ -3736,6 +3736,12 @@ 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