From a6e43004d030c025a49e850ccf231bd6861b4b60 Mon Sep 17 00:00:00 2001 From: tim neutkens Date: Sun, 15 Jan 2017 22:47:14 +0100 Subject: [PATCH] Use UTC time to avoid time differences --- examples/with-mobx/components/Clock.js | 2 +- examples/with-redux/components/Clock.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/with-mobx/components/Clock.js b/examples/with-mobx/components/Clock.js index 394d4543192f8..caf2880817ad3 100644 --- a/examples/with-mobx/components/Clock.js +++ b/examples/with-mobx/components/Clock.js @@ -19,6 +19,6 @@ export default (props) => { ) } -const format = t => `${pad(t.getHours())}:${pad(t.getMinutes())}:${pad(t.getSeconds())}` +const format = t => `${pad(t.getUTCHours())}:${pad(t.getUTCMinutes())}:${pad(t.getUTCSeconds())}` const pad = n => n < 10 ? `0${n}` : n diff --git a/examples/with-redux/components/Clock.js b/examples/with-redux/components/Clock.js index bd09f5407e73d..d8e05ceae3f4b 100644 --- a/examples/with-redux/components/Clock.js +++ b/examples/with-redux/components/Clock.js @@ -19,6 +19,6 @@ export default ({ lastUpdate, light }) => { ) } -const format = t => `${pad(t.getHours())}:${pad(t.getMinutes())}:${pad(t.getSeconds())}` +const format = t => `${pad(t.getUTCHours())}:${pad(t.getUTCMinutes())}:${pad(t.getUTCSeconds())}` const pad = n => n < 10 ? `0${n}` : n