Changeset 5086

Show
Ignore:
Timestamp:
10/15/08 19:30:16 (9 months ago)
Author:
jwage
Message:

[1.0, 1.1] fixes #1464 fixes issue with postgres timestampz and the date validators

Location:
branches
Files:
2 added
6 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/lib/Doctrine/Validator/Time.php

    r4072 r5086  
    5353        } 
    5454 
    55         if ( ! preg_match('/^ *[0-9]{2}:[0-9]{2}:[0-9]{2} *$/', $value)) { 
     55        if ( ! preg_match('/^ *\d{2}:\d{2}:\d{2}(.\d{6}\+\d{2})? *$/', $value)) { 
    5656            return false; 
    5757        } 
  • branches/1.0/lib/Doctrine/Validator/Timestamp.php

    r4072 r5086  
    4545        } 
    4646 
    47         if ( ! preg_match('/^ *[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} *$/', $value)) { 
     47        if ( ! preg_match('/^ *\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(.\d{6}\+\d{2})? *$/', $value)) { 
    4848            return false; 
    4949        } 
  • branches/1.0/tests/run.php

    r5066 r5086  
    142142$tickets->addTestCase(new Doctrine_Ticket_1454_TestCase()); 
    143143$tickets->addTestCase(new Doctrine_Ticket_1461_TestCase()); 
     144$tickets->addTestCase(new Doctrine_Ticket_1464_TestCase()); 
    144145$tickets->addTestCase(new Doctrine_Ticket_1465_TestCase()); 
    145146$tickets->addTestCase(new Doctrine_Ticket_1480_TestCase()); 
  • branches/1.1/lib/Doctrine/Validator/Time.php

    r4072 r5086  
    5353        } 
    5454 
    55         if ( ! preg_match('/^ *[0-9]{2}:[0-9]{2}:[0-9]{2} *$/', $value)) { 
     55        if ( ! preg_match('/^ *\d{2}:\d{2}:\d{2}(.\d{6}\+\d{2})? *$/', $value)) { 
    5656            return false; 
    5757        } 
  • branches/1.1/lib/Doctrine/Validator/Timestamp.php

    r4072 r5086  
    4545        } 
    4646 
    47         if ( ! preg_match('/^ *[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} *$/', $value)) { 
     47        if ( ! preg_match('/^ *\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(.\d{6}\+\d{2})? *$/', $value)) { 
    4848            return false; 
    4949        } 
  • branches/1.1/tests/run.php

    r5084 r5086  
    151151$tickets->addTestCase(new Doctrine_Ticket_1454_TestCase()); 
    152152$tickets->addTestCase(new Doctrine_Ticket_1461_TestCase()); 
     153$tickets->addTestCase(new Doctrine_Ticket_1464_TestCase()); 
    153154$tickets->addTestCase(new Doctrine_Ticket_1465_TestCase()); 
    154155$tickets->addTestCase(new Doctrine_Ticket_1467_TestCase());