diff options
author | James Henstridge <james@jamesh.id.au> | 2008-03-17 04:06:44 +0000 |
---|---|---|
committer | James Henstridge <james@jamesh.id.au> | 2008-03-17 04:06:44 +0000 |
commit | cceaa7331b82294952aa18beba63616187f2fd93 (patch) | |
tree | 4f84aaadcaba613687d7f70e04210e658ec69828 /psycopg/adapter_datetime.c | |
parent | 1ea0cd498000ebd7ba1c3843d28d7df4ab6a68c7 (diff) | |
download | psycopg2-cceaa7331b82294952aa18beba63616187f2fd93.tar.gz |
* psycopg/typecast.c (typecast_parse_time): give the correct
return value for partially parsed time values.
* psycopg/typecast_mxdatetime.c (typecast_MXDATE_cast): return
NULL after setting DataError. Also, don't treat it as an error if
typecast_parse_time() returns 0 (as might happen if the remainder
of the string is " BC").
* psycopg/typecast_datetime.c (typecast_PYDATE_cast): return NULL
after setting DataError.
(typecast_PYDATETIME_cast): same here.
(typecast_PYTIME_cast): same here.
* tests/test_dates.py
(CommonDatetimeTestsMixin.test_parse_incomplete_date): test that
parsing incomplete date values results in DataError.
(CommonDatetimeTestsMixin.test_parse_incomplete_time): same for
times.
(CommonDatetimeTestsMixin.test_parse_incomplete_time): same for
datetimes.
Diffstat (limited to 'psycopg/adapter_datetime.c')
0 files changed, 0 insertions, 0 deletions