Commit a4f9ba1f7a9ba63538934707b1daa6908fbf27be
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
lib/mysql.js
| ... | ... | @@ -431,7 +431,8 @@ MySQL.prototype.fromColumnValue = function(prop, val) { |
| 431 | 431 | if (val == '0000-00-00 00:00:00') { |
| 432 | 432 | val = null; |
| 433 | 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 | 437 | break; |
| 437 | 438 | case 'Boolean': | ... | ... |