Ticket #8111: __init__.py.diff

File __init__.py.diff, 1.1 KB (added by Matic Žgur, 16 years ago)
  • __init__.py

     
    631631                value, usecs = value.split('.')
    632632                usecs = int(usecs)
    633633            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.')
    635635        else:
    636636            usecs = 0
    637637        kwargs = {'microsecond': usecs}
     
    648648                    return datetime.datetime(*time.strptime(value, '%Y-%m-%d')[:3],
    649649                                             **kwargs)
    650650                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.')
    652652
    653653    def get_db_prep_value(self, value):
    654654        # Casts dates into the format expected by the backend
Back to Top