xref: /PHP-7.4/ext/date/tests/68062.phpt (revision ce1d69a1)
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