summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/date/tests/bug20382-2.phpt22
-rw-r--r--ext/date/tests/bug27780.phpt54
-rw-r--r--ext/date/tests/bug32086.phpt20
-rw-r--r--ext/date/tests/bug33414-1.phpt52
-rw-r--r--ext/date/tests/bug33414-2.phpt24
-rw-r--r--ext/date/tests/bug33415-1.phpt4
-rw-r--r--ext/date/tests/bug33415-2.phpt84
-rw-r--r--ext/date/tests/bug73858.phpt6
-rw-r--r--ext/date/tests/date_modify-1.phpt4
9 files changed, 135 insertions, 135 deletions
diff --git a/ext/date/tests/bug20382-2.phpt b/ext/date/tests/bug20382-2.phpt
index 39778ae284..2488c4729e 100644
--- a/ext/date/tests/bug20382-2.phpt
+++ b/ext/date/tests/bug20382-2.phpt
@@ -43,20 +43,20 @@ foreach ($tests as $test) {
print "wanted = Monday 00:00:00\n\n";
}
?>
---EXPECT--
+--EXPECTF--
Europe/Andorra
ts = Monday 2037-10-19 17:17:17 CEST
result = Monday 2037-10-26 00:00:00 CET
wanted = Monday 00:00:00
Asia/Dubai
-ts = Thursday 1970-01-01 17:17:17 GST
-result = Monday 1970-01-05 00:00:00 GST
+ts = Thursday 1970-01-01 17:17:17 %s
+result = Monday 1970-01-05 00:00:00 %s
wanted = Monday 00:00:00
Asia/Kabul
-ts = Thursday 1970-01-01 17:17:17 AFT
-result = Monday 1970-01-05 00:00:00 AFT
+ts = Thursday 1970-01-01 17:17:17 %s
+result = Monday 1970-01-05 00:00:00 %s
wanted = Monday 00:00:00
America/Antigua
@@ -130,8 +130,8 @@ result = Monday 1971-01-04 00:00:00 AST
wanted = Monday 00:00:00
Asia/Dacca
-ts = Friday 1971-01-01 17:17:17 DACT
-result = Monday 1971-01-04 00:00:00 DACT
+ts = Friday 1971-01-01 17:17:17 %s
+result = Monday 1971-01-04 00:00:00 %s
wanted = Monday 00:00:00
Europe/Brussels
@@ -150,13 +150,13 @@ result = Monday 1983-04-18 01:00:00 CEST
wanted = Monday 00:00:00
America/Buenos_Aires
-ts = Monday 1974-09-30 17:17:17 ART
-result = Monday 1974-10-07 00:00:00 ART
+ts = Monday 1974-09-30 17:17:17 %s
+result = Monday 1974-10-07 00:00:00 %s
wanted = Monday 00:00:00
America/Rosario
-ts = Monday 1974-09-30 17:17:17 ART
-result = Monday 1974-10-07 00:00:00 ART
+ts = Monday 1974-09-30 17:17:17 %s
+result = Monday 1974-10-07 00:00:00 %s
wanted = Monday 00:00:00
Europe/Vienna
diff --git a/ext/date/tests/bug27780.phpt b/ext/date/tests/bug27780.phpt
index af35b8fbf0..b1cfa831a2 100644
--- a/ext/date/tests/bug27780.phpt
+++ b/ext/date/tests/bug27780.phpt
@@ -41,7 +41,7 @@ foreach ($timezones as $timezone) {
echo "\n";
}
?>
---EXPECT--
+--EXPECTF--
America/Chicago
1076824799 [2004-02-14 23:59:59 CST] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
1076824800 [2004-02-15 00:00:00 CST] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
@@ -88,31 +88,31 @@ Asia/Jerusalem
1083099600 [2004-04-28 00:00:00 IDT] [2004-04-07 00:00:00 +21 days]
Asia/Singapore
-1076774399 [2004-02-14 23:59:59 SGT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
-1076774400 [2004-02-15 00:00:00 SGT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
-1076774401 [2004-02-15 00:00:01 SGT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
-1079452800 [2004-03-17 00:00:00 SGT] [2004-04-07 00:00:00 -21 days]
-1080316800 [2004-03-27 00:00:00 SGT] [2004-04-07 00:00:00 11 days ago]
-1080410400 [2004-03-28 02:00:00 SGT] [2004-04-07 00:00:00 -10 day +2 hours]
-1081180800 [2004-04-06 00:00:00 SGT] [2004-04-07 00:00:00 -1 day]
-1081267200 [2004-04-07 00:00:00 SGT] [2004-04-07 00:00:00]
-1081270800 [2004-04-07 01:00:00 SGT] [2004-04-07 00:00:00 +1 hour]
-1081274400 [2004-04-07 02:00:00 SGT] [2004-04-07 00:00:00 +2 hour]
-1081353600 [2004-04-08 00:00:00 SGT] [2004-04-07 00:00:00 +1 day]
-1081353600 [2004-04-08 00:00:00 SGT] [2004-04-07 00:00:00 1 day]
-1083081600 [2004-04-28 00:00:00 SGT] [2004-04-07 00:00:00 +21 days]
+1076774399 [2004-02-14 23:59:59 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
+1076774400 [2004-02-15 00:00:00 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
+1076774401 [2004-02-15 00:00:01 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
+1079452800 [2004-03-17 00:00:00 %s] [2004-04-07 00:00:00 -21 days]
+1080316800 [2004-03-27 00:00:00 %s] [2004-04-07 00:00:00 11 days ago]
+1080410400 [2004-03-28 02:00:00 %s] [2004-04-07 00:00:00 -10 day +2 hours]
+1081180800 [2004-04-06 00:00:00 %s] [2004-04-07 00:00:00 -1 day]
+1081267200 [2004-04-07 00:00:00 %s] [2004-04-07 00:00:00]
+1081270800 [2004-04-07 01:00:00 %s] [2004-04-07 00:00:00 +1 hour]
+1081274400 [2004-04-07 02:00:00 %s] [2004-04-07 00:00:00 +2 hour]
+1081353600 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 +1 day]
+1081353600 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 1 day]
+1083081600 [2004-04-28 00:00:00 %s] [2004-04-07 00:00:00 +21 days]
America/Sao_Paulo
-1076810399 [2004-02-14 23:59:59 BRST] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
-1076814000 [2004-02-15 00:00:00 BRT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
-1076814001 [2004-02-15 00:00:01 BRT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
-1079492400 [2004-03-17 00:00:00 BRT] [2004-04-07 00:00:00 -21 days]
-1080356400 [2004-03-27 00:00:00 BRT] [2004-04-07 00:00:00 11 days ago]
-1080450000 [2004-03-28 02:00:00 BRT] [2004-04-07 00:00:00 -10 day +2 hours]
-1081220400 [2004-04-06 00:00:00 BRT] [2004-04-07 00:00:00 -1 day]
-1081306800 [2004-04-07 00:00:00 BRT] [2004-04-07 00:00:00]
-1081310400 [2004-04-07 01:00:00 BRT] [2004-04-07 00:00:00 +1 hour]
-1081314000 [2004-04-07 02:00:00 BRT] [2004-04-07 00:00:00 +2 hour]
-1081393200 [2004-04-08 00:00:00 BRT] [2004-04-07 00:00:00 +1 day]
-1081393200 [2004-04-08 00:00:00 BRT] [2004-04-07 00:00:00 1 day]
-1083121200 [2004-04-28 00:00:00 BRT] [2004-04-07 00:00:00 +21 days]
+1076810399 [2004-02-14 23:59:59 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
+1076814000 [2004-02-15 00:00:00 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
+1076814001 [2004-02-15 00:00:01 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
+1079492400 [2004-03-17 00:00:00 %s] [2004-04-07 00:00:00 -21 days]
+1080356400 [2004-03-27 00:00:00 %s] [2004-04-07 00:00:00 11 days ago]
+1080450000 [2004-03-28 02:00:00 %s] [2004-04-07 00:00:00 -10 day +2 hours]
+1081220400 [2004-04-06 00:00:00 %s] [2004-04-07 00:00:00 -1 day]
+1081306800 [2004-04-07 00:00:00 %s] [2004-04-07 00:00:00]
+1081310400 [2004-04-07 01:00:00 %s] [2004-04-07 00:00:00 +1 hour]
+1081314000 [2004-04-07 02:00:00 %s] [2004-04-07 00:00:00 +2 hour]
+1081393200 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 +1 day]
+1081393200 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 1 day]
+1083121200 [2004-04-28 00:00:00 %s] [2004-04-07 00:00:00 +21 days]
diff --git a/ext/date/tests/bug32086.phpt b/ext/date/tests/bug32086.phpt
index e065c0bac2..db9df51c70 100644
--- a/ext/date/tests/bug32086.phpt
+++ b/ext/date/tests/bug32086.phpt
@@ -34,18 +34,18 @@ echo date("Y-m-d H:i:s T\n", $l);
1099364400
1099364400
1099447200
-2004-11-01 00:00:00 BRT
-2004-11-02 01:00:00 BRST
-2004-11-02 01:00:00 BRST
-2004-11-02 01:00:00 BRST
-2004-11-03 00:00:00 BRST
+2004-11-01 00:00:00 -03
+2004-11-02 01:00:00 -02
+2004-11-02 01:00:00 -02
+2004-11-02 01:00:00 -02
+2004-11-03 00:00:00 -02
1108778400
1108868400
1108868400
1108868400
1108954800
-2005-02-19 00:00:00 BRST
-2005-02-20 00:00:00 BRT
-2005-02-20 00:00:00 BRT
-2005-02-20 00:00:00 BRT
-2005-02-21 00:00:00 BRT
+2005-02-19 00:00:00 -02
+2005-02-20 00:00:00 -03
+2005-02-20 00:00:00 -03
+2005-02-20 00:00:00 -03
+2005-02-21 00:00:00 -03
diff --git a/ext/date/tests/bug33414-1.phpt b/ext/date/tests/bug33414-1.phpt
index 86b3183395..a7596f93f2 100644
--- a/ext/date/tests/bug33414-1.phpt
+++ b/ext/date/tests/bug33414-1.phpt
@@ -200,23 +200,23 @@ print "wanted=Thursday 00:00:00\n\n";
?>
--EXPECT--
TZ=America/Mendoza - wrong day.
-tStamp=Sunday 1992-10-18 17:17:17 ARST 1
-result=Sunday 1992-10-25 00:00:00 ARST 1
+tStamp=Sunday 1992-10-18 17:17:17 -02 1
+result=Sunday 1992-10-25 00:00:00 -02 1
wanted=Sunday 00:00:00
TZ=America/Catamarca - wrong day.
-tStamp=Sunday 1990-10-21 17:17:17 ARST 1
-result=Sunday 1990-10-28 00:00:00 ARST 1
+tStamp=Sunday 1990-10-21 17:17:17 -02 1
+result=Sunday 1990-10-28 00:00:00 -02 1
wanted=Sunday 00:00:00
TZ=America/Cordoba - wrong day.
-tStamp=Sunday 1990-10-21 17:17:17 ARST 1
-result=Sunday 1990-10-28 00:00:00 ARST 1
+tStamp=Sunday 1990-10-21 17:17:17 -02 1
+result=Sunday 1990-10-28 00:00:00 -02 1
wanted=Sunday 00:00:00
TZ=America/Rosario - wrong day.
-tStamp=Tuesday 1991-10-15 17:17:17 WART 0
-result=Tuesday 1991-10-22 00:00:00 ARST 1
+tStamp=Tuesday 1991-10-15 17:17:17 -04 0
+result=Tuesday 1991-10-22 00:00:00 -02 1
wanted=Tuesday 00:00:00
TZ=Europe/Vienna - wrong day - giving unexpected results, at
@@ -231,8 +231,8 @@ result=Monday 1992-09-28 00:00:00 +04 0
wanted=Monday 00:00:00
TZ=America/Noronha - wrong day.
-tStamp=Friday 1999-10-01 17:17:17 FNT 0
-result=Friday 1999-10-08 00:00:00 FNST 1
+tStamp=Friday 1999-10-01 17:17:17 -02 0
+result=Friday 1999-10-08 00:00:00 -01 1
wanted=Friday 00:00:00
TZ=America/Havana - wrong day.
@@ -256,13 +256,13 @@ result=Friday 2003-04-04 00:00:00 EEST 1
wanted=Friday 00:00:00
TZ=Pacific/Kwajalein - wrong day.
-tStamp=Friday 1993-08-13 17:17:17 KWAT 0
-result=Saturday 1993-08-21 00:00:00 MHT 0
+tStamp=Friday 1993-08-13 17:17:17 -12 0
+result=Saturday 1993-08-21 00:00:00 +12 0
wanted=Friday 00:00:00
TZ=Asia/Ulan_Bator - wrong day.
-tStamp=Saturday 2001-09-22 17:17:17 ULAST 1
-result=Saturday 2001-09-29 00:00:00 ULAST 1
+tStamp=Saturday 2001-09-22 17:17:17 +09 1
+result=Saturday 2001-09-29 00:00:00 +09 1
wanted=Saturday 00:00:00
TZ=America/Cancun - wrong day.
@@ -286,18 +286,18 @@ result=Thursday 2002-04-11 00:00:00 MDT 1
wanted=Thursday 00:00:00
TZ=Asia/Kuala_Lumpur - wrong day.
-tStamp=Monday 1981-12-28 17:17:17 MALT 0
-result=Monday 1982-01-04 00:00:00 MYT 0
+tStamp=Monday 1981-12-28 17:17:17 +0730 0
+result=Monday 1982-01-04 00:00:00 +08 0
wanted=Monday 00:00:00
TZ=Pacific/Chatham - wrong day.
-tStamp=Monday 1974-10-28 17:17:17 CHAST 0
-result=Monday 1974-11-04 00:00:00 CHADT 1
+tStamp=Monday 1974-10-28 17:17:17 +1245 0
+result=Monday 1974-11-04 00:00:00 +1345 1
wanted=Monday 00:00:00
TZ=America/Lima - wrong day.
-tStamp=Thursday 1985-12-26 17:17:17 PET 0
-result=Thursday 1986-01-02 00:00:00 PEST 1
+tStamp=Thursday 1985-12-26 17:17:17 -05 0
+result=Thursday 1986-01-02 00:00:00 -04 1
wanted=Thursday 00:00:00
TZ=Asia/Karachi - wrong day.
@@ -306,16 +306,16 @@ result=Friday 2002-04-12 00:00:00 PKST 1
wanted=Friday 00:00:00
TZ=America/Asuncion - wrong day.
-tStamp=Wednesday 2002-02-27 17:17:17 PYST 1
-result=Wednesday 2002-03-06 00:00:00 PYST 1
+tStamp=Wednesday 2002-02-27 17:17:17 -03 1
+result=Wednesday 2002-03-06 00:00:00 -03 1
wanted=Wednesday 00:00:00
TZ=Asia/Singapore - wrong day.
-tStamp=Thursday 1981-12-31 17:17:17 SGT 0
-result=Thursday 1982-01-07 00:00:00 SGT 0
+tStamp=Thursday 1981-12-31 17:17:17 +0730 0
+result=Thursday 1982-01-07 00:00:00 +08 0
wanted=Thursday 00:00:00
TZ=America/Montevideo - wrong day.
-tStamp=Thursday 2004-09-16 17:17:17 UYT 0
-result=Thursday 2004-09-23 00:00:00 UYST 1
+tStamp=Thursday 2004-09-16 17:17:17 -03 0
+result=Thursday 2004-09-23 00:00:00 -02 1
wanted=Thursday 00:00:00
diff --git a/ext/date/tests/bug33414-2.phpt b/ext/date/tests/bug33414-2.phpt
index 51cbe3b9f1..8e8ad4b0cf 100644
--- a/ext/date/tests/bug33414-2.phpt
+++ b/ext/date/tests/bug33414-2.phpt
@@ -76,13 +76,13 @@ print "wanted=Friday 00:00:00\n\n";
?>
--EXPECT--
TZ=Pacific/Rarotonga - wrong day.
-tStamp=Thursday 1970-01-01 17:17:17 CKT 0
-result=Tuesday 1970-01-06 00:00:00 CKT 0
+tStamp=Thursday 1970-01-01 17:17:17 -1030 0
+result=Tuesday 1970-01-06 00:00:00 -1030 0
wanted=Tuesday 00:00:00
TZ=Atlantic/South_Georgia - wrong day.
-tStamp=Thursday 1970-01-01 17:17:17 GST 0
-result=Tuesday 1970-01-06 00:00:00 GST 0
+tStamp=Thursday 1970-01-01 17:17:17 -02 0
+result=Tuesday 1970-01-06 00:00:00 -02 0
wanted=Tuesday 00:00:00
TZ=America/Port-au-Prince - wrong day.
@@ -91,13 +91,13 @@ result=Monday 2005-04-04 00:00:00 EDT 1
wanted=Monday 00:00:00
TZ=Pacific/Enderbury - wrong day, off by 2 days.
-tStamp=Thursday 1970-01-01 17:17:17 PHOT 0
-result=Monday 1970-01-05 00:00:00 PHOT 0
+tStamp=Thursday 1970-01-01 17:17:17 -12 0
+result=Monday 1970-01-05 00:00:00 -12 0
wanted=Monday 00:00:00
TZ=Pacific/Kiritimati - wrong day, off by 2 days.
-tStamp=Thursday 1970-01-01 17:17:17 LINT 0
-result=Monday 1970-01-05 00:00:00 LINT 0
+tStamp=Thursday 1970-01-01 17:17:17 -1040 0
+result=Monday 1970-01-05 00:00:00 -1040 0
wanted=Monday 00:00:00
TZ=America/Managua - wrong day.
@@ -106,13 +106,13 @@ result=Tuesday 2005-04-12 00:00:00 CDT 1
wanted=Tuesday 00:00:00
TZ=Pacific/Pitcairn - wrong day.
-tStamp=Thursday 1970-01-01 17:17:17 PNT 0
-result=Wednesday 1970-01-07 00:00:00 PNT 0
+tStamp=Thursday 1970-01-01 17:17:17 -0830 0
+result=Wednesday 1970-01-07 00:00:00 -0830 0
wanted=Wednesday 00:00:00
TZ=Pacific/Fakaofo - wrong day.
-tStamp=Thursday 1970-01-01 17:17:17 TKT 0
-result=Saturday 1970-01-03 00:00:00 TKT 0
+tStamp=Thursday 1970-01-01 17:17:17 -11 0
+result=Saturday 1970-01-03 00:00:00 -11 0
wanted=Saturday 00:00:00
TZ=Pacific/Johnston - wrong day.
diff --git a/ext/date/tests/bug33415-1.phpt b/ext/date/tests/bug33415-1.phpt
index 414515b47f..e596566de9 100644
--- a/ext/date/tests/bug33415-1.phpt
+++ b/ext/date/tests/bug33415-1.phpt
@@ -23,8 +23,8 @@ print "wanted=Sunday 00:00:00\n\n";
--EXPECT--
TZ=America/Jujuy - Is it OK for this to be 2 AM, rather than 1
AM as per most DST transitions?
-tStamp=Monday 1990-10-15 17:17:17 WART 0
-result=Monday 1990-10-22 00:00:00 WART 0
+tStamp=Monday 1990-10-15 17:17:17 -04 0
+result=Monday 1990-10-22 00:00:00 -04 0
wanted=Monday 00:00:00
TZ=Asia/Tbilisi - Is it OK for this to be 2 AM?
diff --git a/ext/date/tests/bug33415-2.phpt b/ext/date/tests/bug33415-2.phpt
index c284f2503e..f59df64e42 100644
--- a/ext/date/tests/bug33415-2.phpt
+++ b/ext/date/tests/bug33415-2.phpt
@@ -208,7 +208,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";
print "wanted=Monday 00:30:00\n\n";
?>
---EXPECT--
+--EXPECTF--
TZ=Africa/Bujumbura - *Note*: Unexpected, as does not appear to
have a DST or timezone transition.
tStamp=Thursday 1970-01-01 17:17:17 CAT 0
@@ -216,14 +216,14 @@ result=Wednesday 1970-01-07 00:00:00 CAT 0
wanted=Wednesday 00:00:00
TZ=Asia/Thimbu - Is it OK for this to be 0:30 AM? yes
-tStamp=Thursday 1987-09-24 17:17:17 IST 0
-result=Thursday 1987-10-01 00:30:00 BTT 0
+tStamp=Thursday 1987-09-24 17:17:17 +0530 0
+result=Thursday 1987-10-01 00:30:00 +06 0
wanted=Thursday 00:30:00
TZ=Indian/Cocos - Is it OK for this to be 6:30 AM? Note: does not
appear to have a DST or timezone transition.
-tStamp=Thursday 1970-01-01 17:17:17 CCT 0
-result=Thursday 1970-01-08 00:00:00 CCT 0
+tStamp=Thursday 1970-01-01 17:17:17 +0630 0
+result=Thursday 1970-01-08 00:00:00 +0630 0
wanted=Thursday 00:00:00
TZ=Africa/Lubumbashi - Is it OK for this to be 2 AM? Note: does
@@ -233,110 +233,110 @@ result=Saturday 1970-01-03 00:00:00 CAT 0
wanted=Saturday 00:00:00
TZ=Asia/Kashgar - Is it OK for this to be 3 AM? yes
-tStamp=Thursday 1980-04-24 17:17:17 XJT 0
-result=Thursday 1980-05-01 00:00:00 XJT 0
+tStamp=Thursday 1980-04-24 17:17:17 +06 0
+result=Thursday 1980-05-01 00:00:00 +06 0
wanted=Thursday 03:00:00
TZ=Indian/Christmas - Is it OK for this to be 7 AM? Note: does
not appear to have a DST or timezone transition.
-tStamp=Thursday 1970-01-01 17:17:17 CXT 0
-result=Sunday 1970-01-04 00:00:00 CXT 0
+tStamp=Thursday 1970-01-01 17:17:17 +07 0
+result=Sunday 1970-01-04 00:00:00 +07 0
wanted=Sunday 00:00:00
TZ=America/Santo_Domingo - Is it OK for this to be 0:30 AM? yes
tStamp=Sunday 1970-10-18 17:17:17 EST 0
-result=Sunday 1970-10-25 00:30:00 EHDT 1
+result=Sunday 1970-10-25 00:30:00 -0430 1
wanted=Sunday 00:30:00
TZ=Pacific/Truk - Is it OK for this to be 10 AM? Note: does not
appear to have a DST or timezone transition.
-tStamp=Thursday 1970-01-01 17:17:17 CHUT 0
-result=Tuesday 1970-01-06 00:00:00 CHUT 0
+tStamp=Thursday 1970-01-01 17:17:17 +10 0
+result=Tuesday 1970-01-06 00:00:00 +10 0
wanted=Tuesday 00:00:00
TZ=Pacific/Ponape - Is it OK for this to be 11 AM? Note: does
not appear to have a DST or timezone transition.
-tStamp=Thursday 1970-01-01 17:17:17 PONT 0
-result=Monday 1970-01-05 00:00:00 PONT 0
+tStamp=Thursday 1970-01-01 17:17:17 +11 0
+result=Monday 1970-01-05 00:00:00 +11 0
wanted=Monday 00:00:00
TZ=America/Scoresbysund - Is it OK for this to be 2 AM? yes
-tStamp=Sunday 1981-03-22 17:17:17 CGT 0
-result=Sunday 1981-03-29 02:00:00 EGST 1
+tStamp=Sunday 1981-03-22 17:17:17 -02 0
+result=Sunday 1981-03-29 02:00:00 +00 1
wanted=Sunday 02:00:00
TZ=America/Guyana - Is it OK for this to be 0:45 AM? yes
-tStamp=Thursday 1975-07-24 17:17:17 GYT 0
-result=Thursday 1975-07-31 00:45:00 GYT 0
+tStamp=Thursday 1975-07-24 17:17:17 -0345 0
+result=Thursday 1975-07-31 00:45:00 -03 0
wanted=Thursday 00:45:00
TZ=Asia/Tehran - Is it OK for this to be 0:30 AM? yes
-tStamp=Tuesday 1977-10-25 17:17:17 IRST 0
-result=Tuesday 1977-11-01 00:30:00 IRST 0
+tStamp=Tuesday 1977-10-25 17:17:17 +0330 0
+result=Tuesday 1977-11-01 00:30:00 +04 0
wanted=Tuesday 00:30:00
TZ=Pacific/Tarawa - Is it OK for this to be Midday? Note: does
not appear to have a DST or timezone transition.
-tStamp=Thursday 1970-01-01 17:17:17 GILT 0
-result=Monday 1970-01-05 00:00:00 GILT 0
+tStamp=Thursday 1970-01-01 17:17:17 +12 0
+result=Monday 1970-01-05 00:00:00 +12 0
wanted=Monday 00:00:00
TZ=Africa/Monrovia - Is it OK for this to be 00:44:30 AM? yes
-tStamp=Monday 1972-04-24 17:17:17 LRT 0
+tStamp=Monday 1972-04-24 17:17:17 %s 0
result=Monday 1972-05-01 00:44:30 GMT 0
wanted=Monday 00:44:30
TZ=Asia/Katmandu - Is it OK for this to 0:15 AM?. yes
-tStamp=Wednesday 1985-12-25 17:17:17 IST 0
-result=Wednesday 1986-01-01 00:15:00 NPT 0
+tStamp=Wednesday 1985-12-25 17:17:17 +0530 0
+result=Wednesday 1986-01-01 00:15:00 +0545 0
wanted=Wednesday 00:15:00
TZ=Pacific/Nauru - Is it OK for this to be 0:30? yes
-tStamp=Tuesday 1979-04-24 17:17:17 NRT 0
-result=Tuesday 1979-05-01 00:30:00 NRT 0
+tStamp=Tuesday 1979-04-24 17:17:17 +1130 0
+result=Tuesday 1979-05-01 00:30:00 +12 0
wanted=Tuesday 00:30:00
TZ=Pacific/Niue - Is it OK for this to be 0:30 AM? yes
-tStamp=Sunday 1978-09-24 17:17:17 NUT 0
-result=Sunday 1978-10-01 00:30:00 NUT 0
+tStamp=Sunday 1978-09-24 17:17:17 -1130 0
+result=Sunday 1978-10-01 00:30:00 -11 0
wanted=Sunday 00:30:00
TZ=Pacific/Port_Moresby - Is it OK for this to be 10 AM? No DST
or timezone transition.
-tStamp=Thursday 1970-01-01 17:17:17 PGT 0
-result=Thursday 1970-01-08 00:00:00 PGT 0
+tStamp=Thursday 1970-01-01 17:17:17 +10 0
+result=Thursday 1970-01-08 00:00:00 +10 0
wanted=Thursday 00:00:00
TZ=America/Miquelon - Is it OK for this to be 1 AM ? yes
tStamp=Thursday 1980-04-24 17:17:17 AST 0
-result=Thursday 1980-05-01 01:00:00 PMST 0
+result=Thursday 1980-05-01 01:00:00 -03 0
wanted=Thursday 01:00:00
TZ=Pacific/Palau - Is it OK for this to be 9 AM? No DST or
timezone transition.
-tStamp=Thursday 1970-01-01 17:17:17 PWT 0
-result=Saturday 1970-01-03 00:00:00 PWT 0
+tStamp=Thursday 1970-01-01 17:17:17 +09 0
+result=Saturday 1970-01-03 00:00:00 +09 0
wanted=Saturday 00:00:00
TZ=Pacific/Funafuti - Is it OK for this to be midday? Note: does
not appear to have a DST or timezone transition.
-tStamp=Thursday 1970-01-01 17:17:17 TVT 0
-result=Wednesday 1970-01-07 00:00:00 TVT 0
+tStamp=Thursday 1970-01-01 17:17:17 +12 0
+result=Wednesday 1970-01-07 00:00:00 +12 0
wanted=Wednesday 00:00:00
TZ=Pacific/Wake - Is it OK for this to be midday? Note: does not
appear to have a DST or timezone transition.
-tStamp=Thursday 1970-01-01 17:17:17 WAKT 0
-result=Tuesday 1970-01-06 00:00:00 WAKT 0
+tStamp=Thursday 1970-01-01 17:17:17 +12 0
+result=Tuesday 1970-01-06 00:00:00 +12 0
wanted=Tuesday 00:00:00
TZ=Pacific/Wallis - Is it OK for this to be midday? Note: does
not appear to have a DST or timezone transition.
-tStamp=Thursday 1970-01-01 17:17:17 WFT 0
-result=Tuesday 1970-01-06 00:00:00 WFT 0
+tStamp=Thursday 1970-01-01 17:17:17 +12 0
+result=Tuesday 1970-01-06 00:00:00 +12 0
wanted=Tuesday 00:00:00
TZ=America/Paramaribo - Is it OK for this to be 0:30 AM? yes
-tStamp=Monday 1984-09-24 17:17:17 SRT 0
-result=Monday 1984-10-01 00:30:00 SRT 0
+tStamp=Monday 1984-09-24 17:17:17 -0330 0
+result=Monday 1984-10-01 00:30:00 -03 0
wanted=Monday 00:30:00
diff --git a/ext/date/tests/bug73858.phpt b/ext/date/tests/bug73858.phpt
index 5b619b1d47..300b366749 100644
--- a/ext/date/tests/bug73858.phpt
+++ b/ext/date/tests/bug73858.phpt
@@ -7,8 +7,8 @@ In the "verbose setup method" I'm trying setup the DateTime object myself
to see if it's the format string which is parsed in correctly or if it's the DateTime
object which is breaking stuff. From the testing it appears DateTime is broken somehow.
*/
-$ss = 'first day of March midnight';
-$es = 'first day of April midnight - 1 second';
+$ss = 'february first day of last month midnight';
+$es = 'february first day of this month midnight - 1 second';
$s = new DateTime($ss);
$e = new DateTime($es);
@@ -50,7 +50,7 @@ effect on the results of the diff. By modifying the datetime with ->modify every
it just means you have to be careful of how we work with DateTimes .
*/
$s = new DateTime($ss);
-$e = new DateTime('first day of April midnight');
+$e = new DateTime('february first day of this month midnight');
$e->modify('- 1 second');
var_dump($e->diff($s)->days); // 30 ... and should be 30
?>
diff --git a/ext/date/tests/date_modify-1.phpt b/ext/date/tests/date_modify-1.phpt
index 7707b7fc24..c35e430df7 100644
--- a/ext/date/tests/date_modify-1.phpt
+++ b/ext/date/tests/date_modify-1.phpt
@@ -22,8 +22,8 @@ $ts->modify("+ 1 hour 1 second");
echo date_format($ts, 'D, d M Y H:i:s T'), "\n";
?>
--EXPECT--
-Thu, 19 Aug 1993 23:59:59 KWAT
-Sat, 21 Aug 1993 00:00:00 MHT
+Thu, 19 Aug 1993 23:59:59 -12
+Sat, 21 Aug 1993 00:00:00 +12
Sun, 27 Mar 2005 01:59:59 CET
Sun, 27 Mar 2005 03:00:00 CEST
Sun, 30 Oct 2005 01:59:59 CEST