summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-03-18 21:01:10 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-03-18 21:01:10 -0400
commit58031fc2c166e3909f13825e6d10d73547193417 (patch)
tree7fa8ae129799a13cfebff40e646a33b4f6a04ff1 /src
parent219f0f10568c1a5a2d0e0ac1429d464af95cb669 (diff)
Fix 'readUtc' to work during DST
Diffstat (limited to 'src')
-rw-r--r--src/c/urweb.c6
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