summaryrefslogtreecommitdiff
path: root/ext/date/lib/unixtime2tm.c
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2011-11-24 17:13:47 +0000
committerDerick Rethans <derick@php.net>2011-11-24 17:13:47 +0000
commit7411ae09f5565b3f0dfbbfeb71c8f848fd38d6ca (patch)
tree526d0470d21f359037dc0fbef6eef61b416f1a0f /ext/date/lib/unixtime2tm.c
parentfb573462cac6b25f2110caf9a0a3d18353398d68 (diff)
downloadphp-git-7411ae09f5565b3f0dfbbfeb71c8f848fd38d6ca.tar.gz
- Fixed bug #60236 (TLA timezone dates are not converted properly from
timestamp). - Fixed bug #55253 (DateTime::add() and sub() result -1 hour on objects with time zone type 2). And fixed some test cases.
Diffstat (limited to 'ext/date/lib/unixtime2tm.c')
-rw-r--r--ext/date/lib/unixtime2tm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/date/lib/unixtime2tm.c b/ext/date/lib/unixtime2tm.c
index 871fa2f5e5..a76fa80991 100644
--- a/ext/date/lib/unixtime2tm.c
+++ b/ext/date/lib/unixtime2tm.c
@@ -146,7 +146,7 @@ void timelib_update_from_sse(timelib_time *tm)
int z = tm->z;
signed int dst = tm->dst;
- timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60));
+ timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60) + (tm->dst * 3600));
tm->z = z;
tm->dst = dst;
@@ -184,7 +184,7 @@ void timelib_unixtime2local(timelib_time *tm, timelib_sll ts)
int z = tm->z;
signed int dst = tm->dst;
- timelib_unixtime2gmt(tm, ts - (tm->z * 60));
+ timelib_unixtime2gmt(tm, ts - (tm->z * 60) + (tm->dst * 3600));
tm->z = z;
tm->dst = dst;