Merge pull request #1201 from thelounge/xpaw/fix-timezone-test

Fix localtime test to correctly use UTC
This commit is contained in:
Jérémie Astori 2017-06-08 01:41:11 -04:00 committed by GitHub
commit b054cae078

View File

@ -6,7 +6,7 @@ const localetime = require("../../../../../client/js/libs/handlebars/localetime"
describe("localetime Handlebars helper", () => {
it("should render a human-readable date", () => {
// 12PM in UTC time
const date = new Date("2014-05-22T12:00:00");
const date = new Date("2014-05-22T12:00:00Z");
// Offset between UTC and local timezone
const offset = date.getTimezoneOffset() * 60 * 1000;