Fix localtime test to correctly use UTC

This commit is contained in:
Pavel Djundik 2017-06-03 10:29:52 +03:00
parent b46f92c7d8
commit bd9e41f2c1

View File

@ -6,7 +6,7 @@ const localetime = require("../../../../../client/js/libs/handlebars/localetime"
describe("localetime Handlebars helper", () => { describe("localetime Handlebars helper", () => {
it("should render a human-readable date", () => { it("should render a human-readable date", () => {
// 12PM in UTC time // 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 // Offset between UTC and local timezone
const offset = date.getTimezoneOffset() * 60 * 1000; const offset = date.getTimezoneOffset() * 60 * 1000;