summaryrefslogtreecommitdiff
path: root/ext/date/tests/bug60236.phpt
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
commita02ca5c881785763534cc8cf0ba580da9e174728 (patch)
treedc0e5646e5fc2647dc00f4b47ffe9c1919090107 /ext/date/tests/bug60236.phpt
parentd4406ad0a4770fa4a7149bb72d757a4b646a866c (diff)
downloadphp-git-a02ca5c881785763534cc8cf0ba580da9e174728.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/tests/bug60236.phpt')
-rw-r--r--ext/date/tests/bug60236.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/date/tests/bug60236.phpt b/ext/date/tests/bug60236.phpt
new file mode 100644
index 0000000000..b2bb62b02e
--- /dev/null
+++ b/ext/date/tests/bug60236.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #60236: TLA timezone dates are not converted properly from timestamp
+--FILE--
+<?php
+$t = new DateTime('2010-07-06 18:38:28 EDT');
+$ts = $t->format('U');
+var_dump($ts);
+$t->setTimestamp($ts);
+var_dump($t);
+?>
+--EXPECT--
+string(10) "1278455908"
+object(DateTime)#1 (3) {
+ ["date"]=>
+ string(19) "2010-07-06 18:38:28"
+ ["timezone_type"]=>
+ int(2)
+ ["timezone"]=>
+ string(3) "EDT"
+}