summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/c/urweb.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 0bc739fc..ab33a9c2 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -3763,23 +3763,13 @@ uw_Basis_bool uw_Basis_le_time(uw_context ctx, uw_Basis_time t1, uw_Basis_time t
uw_Basis_time *uw_Basis_readUtc(uw_context ctx, uw_Basis_string s) {
struct tm stm = {};
char *end = strchr(s, 0);
- stm.tm_isdst = -1;
if (strptime(s, TIME_FMT_PG, &stm) == end || strptime(s, TIME_FMT, &stm) == end) {
uw_Basis_time *r = uw_malloc(ctx, sizeof(uw_Basis_time));
- tzset();
- stm.tm_hour -= timezone / (60 * 60);
-
- r->seconds = mktime(&stm);
+ r->seconds = timegm(&stm);
r->microseconds = 0;
- localtime_r(&r->seconds, &stm);
- if (stm.tm_isdst == 1) {
- ++stm.tm_hour;
- r->seconds = mktime(&stm);
- }
-
return r;
}
else