Skip to content

Commit

Permalink
Merge pull request asmuth#65 from l4u/hide_invalid_time
Browse files Browse the repository at this point in the history
Fixes asmuth#18 hide time when time data is not retrieved from the redis
  • Loading branch information
Paul Asmuth committed Apr 21, 2012
2 parents 7a037f8 + fa06fee commit 6121f52
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pub/fnordmetric.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ var FnordMetric = (function(){
}

function formatTimeOfDay(_time){
var time = new Date();
time.setTime(_time*1000);
return decPrint(time.getHours()) + ':' +
decPrint(time.getMinutes()) + ':' +
decPrint(time.getSeconds());
if(_time === null) {
return "";
} else {
var time = new Date();
time.setTime(_time*1000);
return decPrint(time.getHours()) + ':' +
decPrint(time.getMinutes()) + ':' +
decPrint(time.getSeconds());
}
}

function formatTimeRange(range){
Expand Down

0 comments on commit 6121f52

Please sign in to comment.