Commit b6e72f59 authored by Tim Neutkens's avatar Tim Neutkens Committed by Arunoda Susiripala

Use UTC time to avoid time differences (#782)

parent 8318f5b8
...@@ -19,6 +19,6 @@ export default (props) => { ...@@ -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 const pad = n => n < 10 ? `0${n}` : n
...@@ -19,6 +19,6 @@ export default ({ lastUpdate, light }) => { ...@@ -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 const pad = n => n < 10 ? `0${n}` : n
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment