php-src: DateTimeZone実装
- ext/date/php_date.c からのPHPクラスインターフェース:
static const zend_function_entry date_timezone_methods[] = {
PHP_ME(DateTimeZone, __construct, arginfo_timezone_construct, ZEND_ACC_PUBLIC)
PHP_ME(DateTimeZone, getName, arginfo_timezone_void, ZEND_ACC_PUBLIC)
PHP_ME(DateTimeZone, getOffset, arginfo_timezone_getoffset, ZEND_ACC_PUBLIC)
PHP_ME(DateTimeZone, getTransitions, arginfo_timezone_gettransitions, ZEND_ACC_PUBLIC)
};
PHP_METHOD(DateTimeZone, getTransitions)
{
for (i = 0; i < tz->timecnt; i++) {
array_init(&element);
add_assoc_long(&element, "ts", tz->trans[i]);
add_assoc_string(&element, "time", timelib_time_to_string(dummy));
}
}