Commit:    261c6b31ca748fd97a105314ec78a166b2639db9
Author:    Derick Rethans <git...@derickrethans.nl>         Fri, 12 Apr 2013 
11:23:49 +0100
Parents:   44a9e6b4843de686eab2e2bfa66bdf17ed685d7e
Branches:  master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=261c6b31ca748fd97a105314ec78a166b2639db9

Log:
Always reset those parameters.

Changed paths:
  M  ext/date/lib/unixtime2tm.c


Diff:
diff --git a/ext/date/lib/unixtime2tm.c b/ext/date/lib/unixtime2tm.c
index c177fee..194b3b2 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)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to