From: SourceForge.net <no...@so...> - 2007-12-18 16:23:00
|
Patches item #1853244, was opened at 2007-12-18 11:23 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=316528&aid=1853244&group_id=16528 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Vincent Vinet (vvinet) Assigned to: Nobody/Anonymous (nobody) Summary: Use December 31, 9999 instead of December 13 for infinite Initial Comment: When faced with infinity as a value for datetimes, the current code replaces them with the maximum value for python's datetime type. I guess a type made it into the code, as the date currently used is December 13, 9999... a simple sed -i PgSQL.py -e "s:9999-12-13:9999-12-31:g" Fixes the two occurences, as shown by a subsequent diff -u PgSQL.py.bak PgSQL.py --- PgSQL.py.bak 2007-12-18 11:11:12.000000000 -0500 +++ PgSQL.py 2007-12-18 11:11:36.000000000 -0500 @@ -928,7 +928,7 @@ elif _ftv == DATETIME: if type(value) is DateTimeType: if value in ('infinity', '+infinity', '-infinity'): - fake_infinity = '9999-12-13 23:59:59' # fake infinity + fake_infinity = '9999-12-31 23:59:59' # fake infinity if value[0] == '-': value = '-' + fake_infinity else: @@ -998,7 +998,7 @@ elif _ftv == DATETIME: if _fvt != PG_INTERVAL: if lst[_i] in ('infinity', '+infinity', '-infinity'): - fake_infinity = '9999-12-13 23:59:59' # fake infinity + fake_infinity = '9999-12-31 23:59:59' # fake infinity if lst[_i][0] == '-': lst[_i] = '-' + fake_infinity else: ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=316528&aid=1853244&group_id=16528 |