Uploaded image for project: 'Doctrine DBAL'
  1. Doctrine DBAL
  2. DBAL-92

Timezones of DateTime instances are ignored when persisting dates

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 2.0.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When a DateTime instance, e.g. "2011-02-16 00:00:00 America/New_York" is written into the DB, the timezone is ignored and only "2011-02-16" is persisted. When fetching the date, it is written into a DateTime with the server's timezone, resulting in for example "2011-02-16 00:00:00 Europe/Berlin" which is not correct!

      To fix this issue, Doctrine should convert dates to the server's timezone (if their own timezone differs) before persisting them or before executing queries containing DateTime instances.

        Activity

        bschussek Bernhard Schussek created issue -
        beberlei Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira [ 12394 ] jira-feedback2 [ 17698 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17698 ] jira-feedback3 [ 20053 ]

          People

          • Assignee:
            beberlei Benjamin Eberlei
            Reporter:
            bschussek Bernhard Schussek
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: