1--TEST-- 2DateTimeZone::getOffset() accepts a DateTimeInterface object 3--FILE-- 4<?php 5 6$tz = new DateTimeZone('Europe/London'); 7$dt = new DateTimeImmutable('2014-09-20', $tz); 8 9echo $tz->getOffset($dt); 10echo $tz->getOffset(1); 11--EXPECTF-- 123600 13Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given in %s 14