Ticket #8111: __init__.py.diff
File __init__.py.diff, 1.1 KB (added by , 16 years ago) |
---|
-
__init__.py
631 631 value, usecs = value.split('.') 632 632 usecs = int(usecs) 633 633 except ValueError: 634 raise validators.ValidationError, _('Enter a valid date/time in YYYY-MM-DD HH:MM[ ss[.uuuuuu]] format.')634 raise validators.ValidationError, _('Enter a valid date/time in YYYY-MM-DD HH:MM[:ss[.uuuuuu]] format.') 635 635 else: 636 636 usecs = 0 637 637 kwargs = {'microsecond': usecs} … … 648 648 return datetime.datetime(*time.strptime(value, '%Y-%m-%d')[:3], 649 649 **kwargs) 650 650 except ValueError: 651 raise validators.ValidationError, _('Enter a valid date/time in YYYY-MM-DD HH:MM[ ss[.uuuuuu]] format.')651 raise validators.ValidationError, _('Enter a valid date/time in YYYY-MM-DD HH:MM[:ss[.uuuuuu]] format.') 652 652 653 653 def get_db_prep_value(self, value): 654 654 # Casts dates into the format expected by the backend