[PR #7662] Fix test on Postgres when running on 30/31 march #10589

Closed
opened 2026-01-22 16:08:03 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/7662

State: closed
Merged: No


Adjusted the delta to account for March 30-31 -> Feb 28th + 1 extra day for DST changes. I guess it doesn't hurt to be extra careful.

Today is march 30th and postgres returns "feb 28th" when doing now() - '1 month', for reference:

Doctrine\Tests\ORM\Functional\QueryDqlFunctionTest::testDateSub with data set "month" ('month', 1, 86400)
Failed asserting that two DateTime objects are equal.
--- Expected
+++ Actual
@@ @@
-2019-03-02T16:50:58.973200+0100
+2019-02-28T16:50:58.973200+0100
**Original Pull Request:** https://github.com/doctrine/orm/pull/7662 **State:** closed **Merged:** No --- Adjusted the delta to account for March 30-31 -> Feb 28th + 1 extra day for DST changes. I guess it doesn't hurt to be extra careful. Today is march 30th and postgres returns "feb 28th" when doing now() - '1 month', for reference: ``` Doctrine\Tests\ORM\Functional\QueryDqlFunctionTest::testDateSub with data set "month" ('month', 1, 86400) Failed asserting that two DateTime objects are equal. --- Expected +++ Actual @@ @@ -2019-03-02T16:50:58.973200+0100 +2019-02-28T16:50:58.973200+0100 ```
admin added the pull-request label 2026-01-22 16:08:03 +01:00
admin closed this issue 2026-01-22 16:08:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#10589