Skip to content

Commit

Permalink
fix time formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffsteward committed Apr 24, 2020
1 parent 6c1a251 commit b1ea705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ router.get('/', function(req, res, next) {

// calculate the age of the data
// freshness = number of hours old
const now = new Date();
const now = new Date().toLocaleString('en-US', {timeZone: "America/New_York"});
const exportdate = new Date(data.dateoflastexport);
const freshness = Math.round((now - exportdate)/3600000);
data.datafreshness = freshness;
Expand Down

0 comments on commit b1ea705

Please sign in to comment.