1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Use UTC time to avoid time differences (#782)

This commit is contained in:
Tim Neutkens 2017-01-16 01:14:40 +01:00 committed by Arunoda Susiripala
parent 8318f5b8de
commit b6e72f59e5
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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