fix copy-paste fail found by @marius
This commit is contained in:
parent
ccacb2de3c
commit
3155cb799e
@ -346,8 +346,8 @@ static VALUE rb_mysql_result_fetch_row(int argc, VALUE * argv, VALUE self) {
|
|||||||
val = rb_float_new(strtod(row[i], NULL));
|
val = rb_float_new(strtod(row[i], NULL));
|
||||||
break;
|
break;
|
||||||
case MYSQL_TYPE_TIME: // TIME field
|
case MYSQL_TYPE_TIME: // TIME field
|
||||||
if (memcmp("00:00:00", row[i], 10) == 0) {
|
if (memcmp("00:00:00", row[i], 8) == 0) {
|
||||||
val = rb_str_new(row[i], fieldLengths[i]);
|
val = Qnil;
|
||||||
} else {
|
} else {
|
||||||
strptime(row[i], "%T", &parsedTime);
|
strptime(row[i], "%T", &parsedTime);
|
||||||
val = rb_funcall(rb_cTime, intern_local, 6, INT2NUM(1900+parsedTime.tm_year), INT2NUM(parsedTime.tm_mon+1), INT2NUM(parsedTime.tm_mday), INT2NUM(parsedTime.tm_hour), INT2NUM(parsedTime.tm_min), INT2NUM(parsedTime.tm_sec));
|
val = rb_funcall(rb_cTime, intern_local, 6, INT2NUM(1900+parsedTime.tm_year), INT2NUM(parsedTime.tm_mon+1), INT2NUM(parsedTime.tm_mday), INT2NUM(parsedTime.tm_hour), INT2NUM(parsedTime.tm_min), INT2NUM(parsedTime.tm_sec));
|
||||||
|
Loading…
Reference in New Issue
Block a user