pike.git / lib / modules / Sql.pmod / tds.pike

version» Context lines:

pike.git/lib/modules/Sql.pmod/tds.pike:1:   /* -  * $Id: tds.pike,v 1.17 2006/02/16 12:40:01 grubba Exp $ +  * $Id: tds.pike,v 1.18 2006/02/23 16:29:43 grubba Exp $    *    * A Pike implementation of the TDS protocol.    *    * Henrik Grubbström 2006-02-08.    */      #define TDS_DEBUG   #define TDS_CONVERT_DEBUG      #ifdef TDS_DEBUG
pike.git/lib/modules/Sql.pmod/tds.pike:1235:    int yday = (l > 306)?(l - 305):(l + 60);    l += 31;    int j = (l * 80)/2447;    int mday = l - (j * 2447)/80;    l = j/11;    int mon = j + 1 - l*12;    year += (century + 15)*100 + l;    if (!l && !(year & 3) && ((year % 100) || !(year % 400)))    yday++;    string res = sprintf("%04d-%02d-%02dT%02d:%02d:%02d", -  year, mon, mday, hour, min, sec); +  year, mon+1, mday, hour, min, sec);    TDS_CONV_WERROR("%O ==> %O\n", raw, res);    return res;    }    }    }       static array(string|int) process_row(InPacket inp,    array(mapping(string:mixed)) col_info)    {    if (!col_info) return 0;