I have an input field on a form where users can enter a time in 12-hour
format. Entering 12:00AM on this form seems to be getting interpreted as
12PM (debugging I can see the python time object is datetime.time(12, 0).
Calling the validator directly in the web2py shell gives:
rtn = IS_TIME()('12:00 am')
(datetime.time(12, 0), None)
Is this a bug? Shouldn't it return datetime.time(0, 0)?
Also, seems a little odd that there are no test cases for midnight or
noon in def test_IS_TIME(self)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.