Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions js/utime.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Utime.prototype = {
convertTimestamp: function(input) {
var output = '',
date;
var outputtext = '';

if(!input || input === '') {
return output;
Expand All @@ -58,7 +59,12 @@ Utime.prototype = {
return false;
}

if(this.getOption('timestampUnit') === 's') {
if(input >= 100000000000000){
outputtext = "<i>Assuming that this timestamp is in microseconds (1/1,000,000 second)</i>";
input=Math.round(input/1000);
}else if(input >= 100000000000){
outputtext = "<i>Assuming that this timestamp is in milliseconds</i>";
}else{
input = input * 1000;
}

Expand All @@ -76,7 +82,7 @@ Utime.prototype = {
output += ' ' + date.toString(this.getOption('timeOutputFormat'));
}
}

$("#message-container").html(outputtext);
return output;
},

Expand Down
1 change: 1 addition & 0 deletions popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</div>
<div class="input-group-field">
<input type="text" class="input-group-control input-1" />
<div id="message-container"></div>
</div>
</div>
</div>
Expand Down