From f850e383b1c7f2adeab90f4d3ed338bea4fea639 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Sun, 21 Oct 2018 16:11:11 +0200 Subject: [PATCH] story-content: Fixed fictional dates not being UTC. --- marko/page/story-content/components/chapter-meta/component.js | 4 ++-- marko/page/story-content/components/chapter/index.marko | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/marko/page/story-content/components/chapter-meta/component.js b/marko/page/story-content/components/chapter-meta/component.js index 780b245..0a423c9 100644 --- a/marko/page/story-content/components/chapter-meta/component.js +++ b/marko/page/story-content/components/chapter-meta/component.js @@ -11,7 +11,7 @@ module.exports = class { } } - updateState({kind, weak, value, updated}) { + updateState({kind, weak, value, utc, updated}) { this.state = {text: null, color: "color-menu", href: null, tooltip: null} if (value == null || value == "") { @@ -20,7 +20,7 @@ module.exports = class { switch (kind) { case "date": { - const m = moment(value) + const m = utc ? moment.utc(value) : moment(value) if (m.year() < 2) { break } diff --git a/marko/page/story-content/components/chapter/index.marko b/marko/page/story-content/components/chapter/index.marko index 50aab09..a21f2ab 100644 --- a/marko/page/story-content/components/chapter/index.marko +++ b/marko/page/story-content/components/chapter/index.marko @@ -12,7 +12,7 @@ import moment from "moment" - +