Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
b6e72f59
Commit
b6e72f59
authored
Jan 16, 2017
by
Tim Neutkens
Committed by
Arunoda Susiripala
Jan 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use UTC time to avoid time differences (#782)
parent
8318f5b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
Clock.js
examples/with-mobx/components/Clock.js
+1
-1
Clock.js
examples/with-redux/components/Clock.js
+1
-1
No files found.
examples/with-mobx/components/Clock.js
View file @
b6e72f59
...
@@ -19,6 +19,6 @@ export default (props) => {
...
@@ -19,6 +19,6 @@ export default (props) => {
)
)
}
}
const
format
=
t
=>
`
${
pad
(
t
.
get
Hours
())}
:
${
pad
(
t
.
getMinutes
())}
:
${
pad
(
t
.
get
Seconds
())}
`
const
format
=
t
=>
`
${
pad
(
t
.
get
UTCHours
())}
:
${
pad
(
t
.
getUTCMinutes
())}
:
${
pad
(
t
.
getUTC
Seconds
())}
`
const
pad
=
n
=>
n
<
10
?
`0
${
n
}
`
:
n
const
pad
=
n
=>
n
<
10
?
`0
${
n
}
`
:
n
examples/with-redux/components/Clock.js
View file @
b6e72f59
...
@@ -19,6 +19,6 @@ export default ({ lastUpdate, light }) => {
...
@@ -19,6 +19,6 @@ export default ({ lastUpdate, light }) => {
)
)
}
}
const
format
=
t
=>
`
${
pad
(
t
.
get
Hours
())}
:
${
pad
(
t
.
getMinutes
())}
:
${
pad
(
t
.
get
Seconds
())}
`
const
format
=
t
=>
`
${
pad
(
t
.
get
UTCHours
())}
:
${
pad
(
t
.
getUTCMinutes
())}
:
${
pad
(
t
.
getUTC
Seconds
())}
`
const
pad
=
n
=>
n
<
10
?
`0
${
n
}
`
:
n
const
pad
=
n
=>
n
<
10
?
`0
${
n
}
`
:
n
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment