Skip to content

Commit 0306923

Browse files
BernardoFBBragamderrick
authored andcommitted
corrects timezone specific bug on time display (#60)
* corrects timezone specific bug on time display sometimes displays 23:00:00:00 instead of 00:00:00:00 * Corrects typo on pull request #60 and changes year to 1970 (epoch)
1 parent 6fca3f0 commit 0306923

File tree

1 file changed

+1
-1
lines changed
  • src/components/controls/time

1 file changed

+1
-1
lines changed

src/components/controls/time/Time.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var Time = React.createClass({
2525
* @return {string} Timestamp in the format of HH:MM:SS
2626
*/
2727
formatTime(seconds) {
28-
var date = new Date(null);
28+
var date = new Date(Date.UTC(1970,1,1,0,0,0,0));
2929
seconds = isNaN(seconds) ? 0 : Math.floor(seconds);
3030
date.setSeconds(seconds);
3131
return date.toISOString().substr(11, 8);

0 commit comments

Comments
 (0)