Commit a4f9ba1f7a9ba63538934707b1daa6908fbf27be

Authored by Arsisakarn Srilatanart
1 parent 045e7c01
Exists in master

DateTime when get from mysql database, return to loopback as date string (same as seen in database)

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
@@ -431,7 +431,8 @@ MySQL.prototype.fromColumnValue = function(prop, val) { @@ -431,7 +431,8 @@ MySQL.prototype.fromColumnValue = function(prop, val) {
431 if (val == '0000-00-00 00:00:00') { 431 if (val == '0000-00-00 00:00:00') {
432 val = null; 432 val = null;
433 } else { 433 } else {
434 - val = new Date(val.toString().replace(/GMT.*$/, 'GMT')); 434 + //val = new Date(val.toString().replace(/GMT.*$/, 'GMT'));
  435 + val = val.toString(); // return as mysql date string
435 } 436 }
436 break; 437 break;
437 case 'Boolean': 438 case 'Boolean':