Skip to content

Commit abd4e0a

Browse files
committed
Remove DATE manipulations in toColumnValue and formColumnValue, see: loopbackio#149
1 parent 0cb17dc commit abd4e0a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/mysql.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ MySQL.prototype.toColumnValue = function(prop, val) {
353353
if (!val.toUTCString) {
354354
val = new Date(val);
355355
}
356-
return dateToMysql(val);
356+
return val;
357357
}
358358
if (prop.type === Boolean) {
359359
return !!val;
@@ -405,7 +405,6 @@ MySQL.prototype.fromColumnValue = function(prop, val) {
405405
val = String(val);
406406
break;
407407
case 'Date':
408-
val = new Date(val.toString().replace(/GMT.*$/, 'GMT'));
409408
break;
410409
case 'Boolean':
411410
val = Boolean(val);

0 commit comments

Comments
 (0)