Skip to content

Commit c6ea819

Browse files
committed
Added missing date_default_timezone_set('UTC'); to the appropriate tests. A few now pass by not showing the timezone warning.
1 parent dbed284 commit c6ea819

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

ext/date/tests/DateInterval_format.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Daniel Convissor <danielc@php.net>
1010
<?php if (!method_exists('DateInterval', 'format')) die("skip: method doesn't exist"); ?>
1111
--FILE--
1212
<?php
13+
date_default_timezone_set('UTC');
1314

1415
$date1 = new DateTime('2000-01-01 00:00:00');
1516
$date2 = new DateTime('2001-03-04 04:05:06');

ext/date/tests/bug48187.phpt

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Bug #48187 (DateTime::diff() corrupting microtime() result)
33
--FILE--
44
<?php
5+
date_default_timezone_set('UTC');
6+
57
// two arbitrary dates
68
$date1 = new DateTime('2005-07-23');
79
$date2 = new DateTime('2006-02-14');

ext/date/tests/bug51819.phpt

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Bug #51819 (Case discrepancy in timezone names cause Uncaught exception and fatal error)
33
--FILE--
44
<?php
5+
date_default_timezone_set('UTC');
6+
57
$aTzAbbr = timezone_abbreviations_list();
68

79
$aTz = array();

ext/date/tests/bug51866.phpt

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Bug #51866 (Lenient parsing with parseFromFormat)
33
--FILE--
44
<?php
5+
date_default_timezone_set('UTC');
6+
57
$tests = array(
68
array( 'Y-m-d', '2001-11-29 13:20:01' ),
79
array( 'Y-m-d+', '2001-11-29 13:20:01' ),

0 commit comments

Comments
 (0)