Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-22

Saving UTC Offset in Postgres DATETIME messes with PHP DateTime and Timezones

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-BETA3
    • Component/s: Platforms
    • Labels:
      None

      Description

      The DateTime type is currently unusable in PostgreSQL due to a wrong parsing format.

      PostgreSqlPlatform::getDateTimeFormatString() should be changed from:

      Y-m-d H:i:sO

      to

      Y-m-d H:i:s.uO

      According to http://twitter.com/auroraeosrose/statuses/16154268629

      Also, there's no way to check if a convert From and To PHP/Database worked correctly. Maybe we should introduce an exception when a DBAL\Type conversion fails, otherwise, there's no way to figure it out what happened.

        Activity

        Guilherme Blanco created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Assignee Guilherme Blanco [ guilhermeblanco ] Benjamin Eberlei [ beberlei ]
        Benjamin Eberlei made changes -
        Summary Wrong DateTime format in PgSQL Platform Saving UTC Offset in Postgres DATETIME messes with PHP DateTime and Timezones
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 11490 ] jira-feedback2 [ 17640 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17640 ] jira-feedback3 [ 19995 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Guilherme Blanco
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: