You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing a Timezone of '+00:00' (which is valid in normal PHP), while using timecop, it throws an abnormal php notice. This can lead to an exit of the programm depending on your error_reporting setting.
--TEST--
Check timezone '+00:00' being allowed
--SKIPIF--
<?php$required_func = array("timecop_freeze");
include(__DIR__."/tests-skipcheck.inc.php");
--INI--
date.timezone=America/Los_Angeles
timecop.func_override=1
--FILE--
<?php$dt1 = new \DateTime('@0', new \DateTimeZone('+00:00'));
var_dump($dt1->format("Y-m-d H:i:s.uP"));
timecop_freeze(0);
$dt2 = new \DateTime('@0', new \DateTimeZone('+00:00'));
var_dump($dt2->format("Y-m-d H:i:s.uP"));
--EXPECT--
string(32) "1970-01-01 00:00:00.000000+00:00"string(32) "1970-01-01 00:00:00.000000+00:00"
Output of the test:
========OUT========
string(32) "1970-01-01 00:00:00.000000+00:00"
Notice: date_default_timezone_set(): Timezone ID '+00:00' is invalid in ... on line 6
string(32) "1970-01-01 00:00:00.000000+00:00"
========DONE========
========EXP========
string(32) "1970-01-01 00:00:00.000000+00:00"
string(32) "1970-01-01 00:00:00.000000+00:00"
========DONE========
========DIFF========
002+
003+ Notice: date_default_timezone_set(): Timezone ID '+00:00' is invalid in ... on line 6
========DONE========
The text was updated successfully, but these errors were encountered:
When passing a Timezone of '+00:00' (which is valid in normal PHP), while using timecop, it throws an abnormal php notice. This can lead to an exit of the programm depending on your
error_reporting
setting.Output of the test:
The text was updated successfully, but these errors were encountered: