public function testExists() { $this->
assertTrue(Timezones::
exists('Europe/Amsterdam'
));
$this->
assertTrue(Timezones::
exists('US/Pacific'
)); // alias in icu (not compiled), identifier available in php
$this->
assertFalse(Timezones::
exists('Etc/Unknown'
));
} public function testGetRawOffset() { // timezones free from DST changes to avoid time-based variance
$this->
assertSame(0, Timezones::
getRawOffset('Etc/UTC'
));
$this->
assertSame(-10800, Timezones::
getRawOffset('America/Buenos_Aires'
));
$this->
assertSame(20700, Timezones::
getRawOffset('Asia/Katmandu'
));
// ensure we support identifiers available in php (not compiled from icu)
Timezones::
getRawOffset('US/Pacific'
);
} public function testGetRawOffsetWithUnknownTimezone() { $this->
expectException(\Exception::
class);
$this->
expectExceptionMessage('Unknown or bad timezone (foobar)'
);