fixed IS_TIME()('12:00 am')
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -2188,6 +2188,8 @@ class IS_TIME(Validator):
|
|||||||
s = int(value.group('s'))
|
s = int(value.group('s'))
|
||||||
if value.group('d') == 'pm' and 0 < h < 12:
|
if value.group('d') == 'pm' and 0 < h < 12:
|
||||||
h = 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
|
if not (h in range(24) and m in range(60) and s
|
||||||
in range(60)):
|
in range(60)):
|
||||||
raise ValueError('Hours or minutes or seconds are outside of allowed range')
|
raise ValueError('Hours or minutes or seconds are outside of allowed range')
|
||||||
|
|||||||
Reference in New Issue
Block a user