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) --- Cargo.lock | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 880eb700..86c1c272 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -178,6 +178,12 @@ version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.11.1" @@ -2189,6 +2195,7 @@ dependencies = [ "tar", "tempfile", "twox-hash", + "tzfile", "zip", ] @@ -2682,6 +2689,16 @@ version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" +[[package]] +name = "tzfile" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f59c22c42a2537e4c7ad21a4007273bbc5bebed7f36bc93730a5780e22a4592e" +dependencies = [ + "byteorder", + "chrono", +] + [[package]] name = "unicode-general-category" version = "1.1.0" -- cgit v1.3.1-4-g156e