From 261c6b31ca748fd97a105314ec78a166b2639db9 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 12 Apr 2013 11:23:49 +0100 Subject: Always reset those parameters. --- ext/date/lib/unixtime2tm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ext/date/lib/unixtime2tm.c') diff --git a/ext/date/lib/unixtime2tm.c b/ext/date/lib/unixtime2tm.c index c177feebb1..194b3b2116 100644 --- a/ext/date/lib/unixtime2tm.c +++ b/ext/date/lib/unixtime2tm.c @@ -137,19 +137,16 @@ void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts) void timelib_update_from_sse(timelib_time *tm) { timelib_sll sse; + int z = tm->z; + signed int dst = tm->dst; sse = tm->sse; switch (tm->zone_type) { case TIMELIB_ZONETYPE_ABBR: case TIMELIB_ZONETYPE_OFFSET: { - int z = tm->z; - signed int dst = tm->dst; - timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60) + (tm->dst * 3600)); - tm->z = z; - tm->dst = dst; goto cleanup; } @@ -171,6 +168,8 @@ cleanup: tm->sse = sse; tm->is_localtime = 1; tm->have_zone = 1; + tm->z = z; + tm->dst = dst; } void timelib_unixtime2local(timelib_time *tm, timelib_sll ts) -- cgit v1.2.1