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:
parent
8318f5b8de
commit
b6e72f59e5
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue