Skip to content

Conversation

@kloostermanw
Copy link

@kloostermanw kloostermanw commented Sep 10, 2025

This pull request fixes a DATE issue with timezone conversion.

for example this test was failing

    /**
     * Ensures setting DOB from a \DateTime (UTC) stores a date-only value and returns string when requested.
     *
     * Expectation: getDateOfBirth() returns '1980-01-01' as a string.
     */
    public function testSetsDateOfBirthFromDateTimeAndReturnsString()
    {
        $this->setupTestDatabase();

        $objEmployee = $this->getEmployeeCwJules();
        $objDateTime = new \DateTime('1980-01-01', new \DateTimeZone('UTC'));
        $objEmployee->setDateOfBirth($objDateTime);
        $objEmployee->save();

        $this->assertEquals('1980-01-01', $objEmployee->getDateOfBirth());
    }

closes #20

@flangfeldt flangfeldt merged commit 1691164 into v1.6.10-php81 Sep 10, 2025
6 checks passed
@flangfeldt flangfeldt deleted the feature/issue-20 branch September 10, 2025 15:34
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.

3 participants