Merge pull request #1201 from thelounge/xpaw/fix-timezone-test
Fix localtime test to correctly use UTC
This commit is contained in:
commit
b054cae078
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user