php-src/ext/intl/tests/calendar_setTimeZone_basic.phpt
Gina Peter Banyard c42e6d62d8
ext/intl: modernize tests (#19392)
This is effectively removing ZPP tests, enabling warnings, and moving INI settings into the INI PHPT block
2025-08-06 23:33:48 +01:00

31 lines
694 B
PHP

--TEST--
IntlCalendar::setTimeZone() basic test
--EXTENSIONS--
intl
--FILE--
<?php
$intlcal = IntlCalendar::createInstance('Europe/Amsterdam');
print_r($intlcal->getTimeZone()->getID());
echo "\n";
var_dump($intlcal->get(IntlCalendar::FIELD_ZONE_OFFSET));
$intlcal->setTimeZone(IntlTimeZone::getGMT());
print_r($intlcal->getTimeZone()->getID());
echo "\n";
var_dump($intlcal->get(IntlCalendar::FIELD_ZONE_OFFSET));
intlcal_set_time_zone($intlcal,
IntlTimeZone::createTimeZone('GMT+05:30'));
print_r($intlcal->getTimeZone()->getID());
echo "\n";
var_dump($intlcal->get(IntlCalendar::FIELD_ZONE_OFFSET));
?>
--EXPECT--
Europe/Amsterdam
int(3600000)
GMT
int(0)
GMT+05:30
int(19800000)