Possibly, I have never contributed to an open source project so I don't 
know what's involved.  Are there instructions somewhere?

On Tuesday, February 11, 2014 11:21:15 AM UTC-5, Massimo Di Pierro wrote:
>
> I agree. Can you submit a patch?
>
> On Tuesday, 11 February 2014 09:33:40 UTC-6, User wrote:
>>
>> Thanks, also seems like there should be the following test cases 
>> in \web2py\gluon\tests\test_validators.py def test_IS_TIME(self):
>>
>> rtn = IS_TIME()('12:00 am')
>> self.assertEqual(rtn, (datetime.time(0, 0), None))
>>
>> rtn = IS_TIME()('12:01 am')
>> self.assertEqual(rtn, (datetime.time(0, 1), None))
>>
>> rtn = IS_TIME()('12:00 pm')
>> self.assertEqual(rtn, (datetime.time(12, 0), None))
>>
>>
>>
>>
>>
>> On Tuesday, February 11, 2014 9:10:51 AM UTC-5, Massimo Di Pierro wrote:
>>
>>> You are right. Now fixed in trunk.
>>>
>>> On Tuesday, 11 February 2014 01:57:25 UTC-6, User wrote:
>>>>
>>>> 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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to