不要怂,就是干,撸起袖子干!

Commit d9aa39ab by Jan Aagaard Meier

Merge pull request #3044 from seegno-forks/support/update-moment-2-9-0

Update moment@2.9.0
2 parents edb18238 f7f4ebb5
......@@ -170,7 +170,7 @@ SqlString.formatNamedParameters = function(sql, values, timeZone, dialect) {
};
SqlString.dateToString = function(date, timeZone, dialect) {
date = moment(date).zone(timeZone);
date = moment(date).utcOffset(timeZone);
if (dialect === 'mysql' || dialect === 'mariadb') {
return date.format('YYYY-MM-DD HH:mm:ss');
......
......@@ -37,7 +37,7 @@
"generic-pool": "2.1.1",
"inflection": "1.5.3",
"lodash": "~2.4.0",
"moment": "~2.8.0",
"moment": "^2.9.0",
"node-uuid": "~1.4.1",
"toposort-class": "~0.3.0",
"validator": "~3.22.1"
......
......@@ -1300,7 +1300,7 @@ describe(Support.getTestDialectTeaser('Model'), function() {
it('sorts the results via a date column', function(done) {
var self = this;
self.User.create({username: 'user3', data: 'bar', theDate: moment().add('hours', 2).toDate()}).success(function() {
self.User.create({username: 'user3', data: 'bar', theDate: moment().add(2, 'hours').toDate()}).success(function() {
self.User.findAll({ order: [['theDate', 'DESC']] }).success(function(users) {
expect(users[0].id).to.be.above(users[2].id);
done();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!