mirror of
https://github.com/php/php-src.git
synced 2024-12-03 06:44:07 +08:00
9680829389
Fixes #68062 Should be backported to PHP-5.6 and PHP-5.5. Conflicts: ext/date/tests/bug67118.phpt
14 lines
343 B
PHP
14 lines
343 B
PHP
--TEST--
|
|
DateTimeZone::getOffset() accepts a DateTimeInterface object
|
|
--FILE--
|
|
<?php
|
|
|
|
$tz = new DateTimeZone('Europe/London');
|
|
$dt = new DateTimeImmutable('2014-09-20', $tz);
|
|
|
|
echo $tz->getOffset($dt);
|
|
echo $tz->getOffset(1);
|
|
--EXPECTF--
|
|
3600
|
|
Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, integer given in %s
|