summaryrefslogtreecommitdiff
path: root/ext/date/lib/unixtime2tm.c
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2013-04-12 11:23:49 +0100
committerDerick Rethans <github@derickrethans.nl>2013-11-28 12:02:35 +0000
commit261c6b31ca748fd97a105314ec78a166b2639db9 (patch)
treec5fb3c1e212ea89fe0ab36fbeb7efaec86841db1 /ext/date/lib/unixtime2tm.c
parent44a9e6b4843de686eab2e2bfa66bdf17ed685d7e (diff)
downloadphp-git-261c6b31ca748fd97a105314ec78a166b2639db9.tar.gz
Always reset those parameters.
Diffstat (limited to 'ext/date/lib/unixtime2tm.c')
-rw-r--r--ext/date/lib/unixtime2tm.c9
1 files changed, 4 insertions, 5 deletions
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)