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

Commit 2bf0668e by Jan Aagaard Meier

first attempt at converting all dates to utc

1 parent c15977e3
Showing with 9 additions and 1 deletions
...@@ -165,6 +165,14 @@ var Utils = module.exports = { ...@@ -165,6 +165,14 @@ var Utils = module.exports = {
} }
}, },
firstValueOfHash: function(obj) {
for (var key in obj) {
if (obj.hasOwnProperty(key))
return obj[key]
}
return null
},
inherit: function(subClass, superClass) { inherit: function(subClass, superClass) {
if (superClass.constructor == Function) { if (superClass.constructor == Function) {
// Normal Inheritance // Normal Inheritance
......
...@@ -352,7 +352,7 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() { ...@@ -352,7 +352,7 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() {
}) })
}) })
;(dialect.match(/^postgres/) ? itEventually : it)('stores the current date in createdAt', function(done) { it('stores the current date in createdAt', function(done) {
this.User.create({ username: 'foo' }).success(function(user) { this.User.create({ username: 'foo' }).success(function(user) {
expect(parseInt(+user.createdAt/5000)).toEqual(parseInt(+new Date()/5000)) expect(parseInt(+user.createdAt/5000)).toEqual(parseInt(+new Date()/5000))
done() done()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!