From aad468e8b75ffc3e87ea6dfa22c53a8299fc08da Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 16 Aug 2026 00:29:03 +0900 Subject: feat(php-shim): render human-facing timestamps in the local timezone Split date() into date_utc() and date_local(), the latter resolving the system's local timezone through the tzfile crate ($TZ, then /etc/localtime, falling back to UTC when neither is readable). The timestamps Composer renders for humans -- the GitHub OAuth token note, the GitHub API rate limit reset time, the Perforce client spec fields and the "today" check of the show command -- now go through date_local(). PHP resolves its default timezone from the date.timezone ini setting, which Shirabe does not read, so date_default_timezone_get/set have no input left to model and are dropped from the shim and its callers. The resulting difference is recorded in docs/known-incompatibilities.md. Co-Authored-By: Claude Opus 5 (1M context) --- docs/known-incompatibilities.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docs/known-incompatibilities.md') diff --git a/docs/known-incompatibilities.md b/docs/known-incompatibilities.md index 79ead94c..d90b926b 100644 --- a/docs/known-incompatibilities.md +++ b/docs/known-incompatibilities.md @@ -75,3 +75,21 @@ Reflection on objects a plugin creates itself works as usual. `ob_*()` functions work as usual in PHP, but cannot capture any output from Rust side. + + +## Misc. + +### Default Timezone + +PHP resolves the default timezone from the `date.timezone` INI setting, and +falls back to UTC when it is unset. Shirabe does not read php.ini: it uses the +system's local timezone instead and falls back to UTC when no tz database is +available. + +Only the date time for humans are affected, such as the reset time of the +GitHub API rate limit. The machine-readable time, e.g., timestamps written to +`composer.lock` or `vendor/composer/installed.json` are recorded in UTC in both +Composer and Shirabe. + +Plugins and scripts run in the PHP worker, where `date.timezone` is applied as +usual. -- cgit v1.3.1-4-g156e