Category
stdlib
Problem
Procedural timezone helpers from ext/date are missing. DateTime / DateTimeZone OOP exists on VM (#3072), but scripts that use the procedural API (timezone_open(), default timezone getters/setters) fail with undefined function.
Zend maps timezone_open() to DateTimeZone construction; default timezone functions back date() / time() formatting.
php-src reference
Repro (failure today)
<?php
var_dump(function_exists('timezone_open'));
var_dump(function_exists('date_default_timezone_get'));
$tz = timezone_open('UTC');
var_dump($tz instanceof DateTimeZone);
echo date_default_timezone_get(), "\n";
date_default_timezone_set('Europe/Berlin');
echo date_default_timezone_get(), "\n";
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php repro.php
php bin/vm.php repro.php'
| Runtime |
timezone_open |
date_default_timezone_get |
| Zend |
DateTimeZone object |
current TZ id string |
| This compiler |
undefined function |
undefined function |
Scope (this repo)
| Area |
Path |
| VM |
Reuse lib/VM/DateTimeSupport.php + DateTimeZone builtins from #3072 |
| Builtins |
ext/date/timezone_open.php (or ext/standard/) + default TZ wrappers |
| Register |
ext/standard/Module.php or dedicated ext/date/Module.php |
| JIT/AOT |
VM-first v1 (same as DateTime phase 1); separate JIT issue if needed |
| Tests |
test/compliance/cases/stdlib/timezone_open.phpt, date_default_timezone.phpt |
Done when
Related
Category
stdlibProblem
Procedural timezone helpers from
ext/dateare missing.DateTime/DateTimeZoneOOP exists on VM (#3072), but scripts that use the procedural API (timezone_open(), default timezone getters/setters) fail with undefined function.Zend maps
timezone_open()toDateTimeZoneconstruction; default timezone functions backdate()/time()formatting.php-src reference
ext/date/php_date.c—PHP_FUNCTION(timezone_open),PHP_FUNCTION(date_default_timezone_get),PHP_FUNCTION(date_default_timezone_set)ext/date/php_date.h—php_date_set_tzdb, default timezone storageRepro (failure today)
timezone_opendate_default_timezone_getDateTimeZoneobjectScope (this repo)
lib/VM/DateTimeSupport.php+DateTimeZonebuiltins from #3072ext/date/timezone_open.php(orext/standard/) + default TZ wrappersext/standard/Module.phpor dedicatedext/date/Module.phptest/compliance/cases/stdlib/timezone_open.phpt,date_default_timezone.phptDone when
timezone_open('UTC')returns aDateTimeZoneinstance usable byDateTime::__constructdate_default_timezone_get()/date_default_timezone_set()round-trip matches Zend for named zonesDateTimeZoneconstructor exception parity./script/ci-fast.sh --filter timezone_opengreenscript/capability-matrix.phpRelated