Skip to content

AOT: refresh DateTime stamps after add/sub so format matches Zend (#33911) - #33913

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-33911-datetime-add-sub-stamp
Aug 22, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-33911-datetime-add-sub-stamp

Conversation

@PurHur

@PurHur PurHur commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • ./script/aot-smoke.sh → 8 passed, 0 failed
  • ./script/phpunit.sh --filter Issue33911DateTimeAddSubStampAotTest → OK (3 tests, 19 assertions)
  • Zend vs AOT repro:
    add=2020-02-15 / sub=2020-02-15 / cfd=2020-01-02 02:00
    after_ts=1581724800 / after_fmt=2020-02-15
    
  • #33906 two-local diff still prints 9
  • php-src: ext/date/php_date.c — zim_DateTime_add / zim_DateTime_sub

Made with Cursor

…3911)

Compile-time interval apply wrote __dt_timestamp but left
compileTimeDateTimeTimestamp / dateTimeLocalInstants stale, so
getTimestamp()/format() kept returning the construct instant.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 90226fd into master Aug 22, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-33911-datetime-add-sub-stamp branch August 22, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: AOT DateTime::add/sub with DateInterval is a silent no-op for format/getTimestamp (re-#33781/#30760, ext/date/php_date.c)

1 participant