From 3572498768db9189b14d696e08a02dabf76584ab Mon Sep 17 00:00:00 2001 From: "Jeremie Pardou-Piquemal (Work)" Date: Tue, 16 Dec 2014 10:48:01 +0100 Subject: [PATCH] Fix missing 'Z' in datatime regex --- json_field/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json_field/fields.py b/json_field/fields.py index d6e172d..fa85d4c 100644 --- a/json_field/fields.py +++ b/json_field/fields.py @@ -33,7 +33,7 @@ TIME_RE = re.compile(r'^(%s)$' % TIME_FMT) DATE_RE = re.compile(r'^(%s)$' % DATE_FMT) -DATETIME_RE = re.compile(r'^(%s)T(%s)(%s)?$' % (DATE_FMT, TIME_FMT, TIMEZONE_FMT)) +DATETIME_RE = re.compile(r'^(%s)T(%s)(%s|Z)?$' % (DATE_FMT, TIME_FMT, TIMEZONE_FMT)) class JSONEncoder(json.JSONEncoder): """