bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #19503] PostgreSQLChannel.m/newValueForDateTypeLengthAttribute mill


From: Manuel Guesdon
Subject: [bug #19503] PostgreSQLChannel.m/newValueForDateTypeLengthAttribute milliseconds problem
Date: Tue, 03 Apr 2007 19:24:13 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040804 Galeon/1.3.17

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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]