Commit 12dec05a52e571c88a66a1b6a3ea20d274928c3b
1 parent
8ee66714
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
1 additions
and
0 deletions
Show diff stats
lib/mysql.js
@@ -433,6 +433,7 @@ MySQL.prototype.fromColumnValue = function(prop, val) { | @@ -433,6 +433,7 @@ MySQL.prototype.fromColumnValue = function(prop, val) { | ||
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(); // Wed May 17 2017 15:48:00 GMT+0700 (+07) | 435 | //val = val.toString(); // Wed May 17 2017 15:48:00 GMT+0700 (+07) |
436 | + val = moment(val).format('YYYY-MM-DD HH:mm:ss'); | ||
436 | } | 437 | } |
437 | break; | 438 | break; |
438 | case 'Boolean': | 439 | case 'Boolean': |