URL:
<http://savannah.gnu.org/bugs/?19503>
Summary:
PostgreSQLChannel.m/newValueForDateTypeLengthAttribute milliseconds problem
Project: GNUstep
Submitted by: mguesdon
Submitted on: mardi 03.04.2007 à 21:24
Category: gdl2
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: ayers
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
In PostgreSQLAdaptor/PostgreSQLChannel.m:
newValueForDateTypeLengthAttribute (const void *bytes,
int length,
EOAttribute *attribute,
NSStringEncoding encoding)
There's 2 timeslength >18 case and milliseconds are not handled
....
if (length > 18)
{
char tmpString[3];
getDigits(&str[17],tmpString,2,&error);
second = atoi(tmpString);
}
if (length > 18)
{
char tmpString[3];
getDigits(&str[17],tmpString,2,&error);
second = atoi(tmpString);
}
...
BTW, won't it be better to have:
if (length > 3)
{
char tmpString[5];
getDigits(&str[0],tmpString,4,&error);
year = atoi(tmpString);
if (length > 6)
{
char tmpString[3];
getDigits(&str[5],tmpString,2,&error);
month = atoi(tmpString);
if (...)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?19503>
_______________________________________________
Message posté via/par Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep