Doctrine 1
  1. Doctrine 1
  2. DC-537

Timestamp Validator splits on wrong character (from Trac #2018)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.2
    • Component/s: Validators
    • Labels:
      None
    • Environment:
      Problem exists in SVN as of r7298

      Description

      To validate data of type 'timestamp', the validator splits the Date/Time using a space, where as, the format created by date('c') specifies a 'T' to split the Date/Time. It seems the simple fix should be to change the space on line 47 of Doctrine/Validator/Timestamp.php to a 'T'

      Date generated from gmdate('c') - 2010-03-02T22:08:56+00:00

        Activity

        Hide
        Dave Rowe added a comment -

        Patch to explode on 'T' instead of ' ', to align with the expected results of gmdate('r')

        Show
        Dave Rowe added a comment - Patch to explode on 'T' instead of ' ', to align with the expected results of gmdate('r')
        Hide
        Steffen Zeidler added a comment -

        So how do I now validate datetime values (YYYY-MM-DD HH-MM-SS) before that bugfix? I'm using mysql 5.0, that uses YYYY-MM-DD for column type datetime. May be there should be another validator for that format, thats splits by a space.

        Show
        Steffen Zeidler added a comment - So how do I now validate datetime values (YYYY-MM-DD HH-MM-SS) before that bugfix? I'm using mysql 5.0, that uses YYYY-MM-DD for column type datetime. May be there should be another validator for that format, thats splits by a space.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Dave Rowe
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: