Skip to content

Commit

Permalink
Merge pull request #105 from balderdashy/date-fix
Browse files Browse the repository at this point in the history
Generate date independent of timezone
  • Loading branch information
particlebanana committed Mar 16, 2016
2 parents 65bfbd7 + aeb58c6 commit ba82526
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion interfaces/queryable/modifiers/greaterThan.modifier.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ describe('Queryable Interface', function() {
});

it('should return records with symbolic usage >= usage when searching dates as strings', function(done) {
Queryable.User.find({ type: testName, dob: { '>=': 'Sat Nov 09 2013 00:00:00 GMT-0000 (CST)' }}).sort('first_name').exec(function(err, users) {
var dateString = new Date(2013,10,9);
dateString = dateString.toString();
Queryable.User.find({ type: testName, dob: { '>=': dateString }}).sort('first_name').exec(function(err, users) {
assert.ifError(err);
assert(Array.isArray(users));
assert.strictEqual(users.length, 2);
Expand Down

0 comments on commit ba82526

Please sign in to comment.