Skip to content

Commit

Permalink
Closes billdami#1
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgi Ivanov committed Jan 19, 2015
1 parent bfdfad6 commit d7ec75f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 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 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

0 comments on commit d7ec75f

Please sign in to comment.