Skip to content

Commit

Permalink
Now explicitly output ISO 8601 dates using the datejs library rather …
Browse files Browse the repository at this point in the history
…than rolling our own string in order to avoid weird local time issues (hopefully!)
  • Loading branch information
bensheldon committed Jun 29, 2012
1 parent 31afc50 commit 1e6ad21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/pinger.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@ Fetcher.prototype = {

async.forEachSeries(Object.keys(endpoints), function(city, callback) {
var d = new Date();

// Search previous HOUR
// TODO: make this more exact and not relative to the request
var params = {
start_date: new Date(d - 60 * 60 * 1000).toString('yyyy-MM-ddTHH:mm:ssZ'),
end_date: d.toString('yyyy-MM-ddTHH:mm:ssZ')
start_date: new Date(d - 60 * 60 * 1000).toISOString()
, end_date: d.toISOString()
};
var requestsUrl = self.formatEndpoint(endpoints[city], 'requests', params);

Expand Down

0 comments on commit 1e6ad21

Please sign in to comment.