Skip to content

Commit

Permalink
Use UTC time to avoid time differences (#782)
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens authored and arunoda committed Jan 16, 2017
1 parent 8318f5b commit b6e72f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/with-mobx/components/Clock.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion examples/with-redux/components/Clock.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b6e72f5

Please sign in to comment.