Skip to content
This repository was archived by the owner on Aug 28, 2020. It is now read-only.
This repository was archived by the owner on Aug 28, 2020. It is now read-only.

Datetime fields ignore timezones #8

Description

@e1himself
<?php
namespace Tests\Integration;

use PHPUnit\Framework\TestCase;
use Contact;

class DatetimeTimezoneHandlingTest extends TestCase
{
    /**
     * @test
     */
    public function it_should_properly_handle_datetimes_with_timezone()
    {
        $contact = new Contact();

        $this->assertNull($contact->getCreatedAt());

        $contact->setCreatedAt('2020-01-24T22:00:00+03:00');

        // This fails
        $this->assertContains($contact->getCreatedAt('c'), [
            '2020-01-24T22:00:00+03:00',
            '2020-01-24T19:00:00+00:00',
        ]);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions