From caee53e7787a405433da2e68e2a0c17b5b7157f8 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 11 Feb 2014 08:12:12 -0600 Subject: [PATCH] fixed IS_TIME()('12:00 am') --- VERSION | 2 +- gluon/validators.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b34db6ad..d4ea3e97 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2014.01.30.08.43.19 +Version 2.8.2-stable+timestamp.2014.02.11.08.10.56 diff --git a/gluon/validators.py b/gluon/validators.py index 0790f5e1..ce85eea5 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -2188,6 +2188,8 @@ class IS_TIME(Validator): s = int(value.group('s')) if value.group('d') == 'pm' and 0 < h < 12: h = h + 12 + if value.group('d') == 'am' and h == 12: + h = 0 if not (h in range(24) and m in range(60) and s in range(60)): raise ValueError('Hours or minutes or seconds are outside of allowed range')