Skip to content

Commit

Permalink
Better date formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
j3camero committed Dec 28, 2018
1 parent 6c70d3a commit 3e5beb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -22,6 +22,7 @@
"ejs": "^2.6.1",
"express": "^4.16.4",
"htmlparser2": "^3.10.0",
"moment": "^2.23.0"
"moment": "^2.23.0",
"moment-timezone": "^0.5.23"
}
}
4 changes: 2 additions & 2 deletions server.js
@@ -1,6 +1,6 @@
const express = require('express');
const fs = require('fs');
const moment = require('moment');
const moment = require('moment-timezone');

const app = express();

Expand All @@ -16,7 +16,7 @@ app.get('/', (req, res) => {
res.render('index', {
ranks: ranks.ranks,
updateDuration: t.from(moment()),
updateTime: t.format('MMMM Do YYYY, HH:mm:ss'),
updateTime: t.tz('America/Los_Angeles').format('MMM Do h:mm A'),
});
});

Expand Down

0 comments on commit 3e5beb9

Please sign in to comment.