Skip to content

Commit

Permalink
Was: .toLocaleFormat('%H:%M:%S')
Browse files Browse the repository at this point in the history
  • Loading branch information
pdericson committed Dec 6, 2017
1 parent 7edc7d9 commit 8c76b02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ let table = null;
channel.on("events", payload => {

$(payload.events).each(function(index, event) {
// pdericson "toLocaleFormat" is a firefox-ism
//event.time = new Date(event.time * 1000).toLocaleFormat('%H:%M:%S')
// Was: .toLocaleFormat('%H:%M:%S')
event.time = (new Date(event.time * 1000)).toString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, '$1')
if (parseFloat(event.metric)) {
event.metric = parseFloat(event.metric.toFixed(6))
}
Expand Down

0 comments on commit 8c76b02

Please sign in to comment.