From 384c180e414a982a6cc5ccabc675bcfb4fd80988 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 2 Mar 2013 18:01:24 +0100 Subject: Fixed #19917 -- Added microseconds in default TIME_INPUT_FORMATS Thanks minddust for the report. --- django/conf/global_settings.py | 1 + django/utils/formats.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'django') diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index 13213d0cbb..42df4b601a 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -365,6 +365,7 @@ DATE_INPUT_FORMATS = ( # * Note that these format strings are different from the ones to display dates TIME_INPUT_FORMATS = ( '%H:%M:%S', # '14:30:59' + '%H:%M:%S.%f', # '14:30:59.000200' '%H:%M', # '14:30' ) diff --git a/django/utils/formats.py b/django/utils/formats.py index f0abdc2f7b..cc66149026 100644 --- a/django/utils/formats.py +++ b/django/utils/formats.py @@ -19,7 +19,7 @@ _format_modules_cache = {} ISO_INPUT_FORMATS = { 'DATE_INPUT_FORMATS': ('%Y-%m-%d',), - 'TIME_INPUT_FORMATS': ('%H:%M:%S', '%H:%M'), + 'TIME_INPUT_FORMATS': ('%H:%M:%S', '%H:%M:%S.%f', '%H:%M'), 'DATETIME_INPUT_FORMATS': ( '%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', -- cgit v1.3