fixed IS_TIME()('12:00 am')

This commit is contained in:
mdipierro
2014-02-11 08:12:12 -06:00
parent 4c3ab339cd
commit caee53e778
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -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
+2
View File
@@ -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')