From d7ec75fe479b7665762f201012fce90168c46669 Mon Sep 17 00:00:00 2001 From: Georgi Ivanov Date: Mon, 19 Jan 2015 17:23:23 +0100 Subject: [PATCH 1/2] Closes #1 --- js/utime.js | 8 +++++++- popup.html | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/js/utime.js b/js/utime.js index fa6e7e1..2aedf67 100644 --- a/js/utime.js +++ b/js/utime.js @@ -47,6 +47,7 @@ Utime.prototype = { convertTimestamp: function(input) { var output = '', date; + var outputtext = ''; if(!input || input === '') { return output; @@ -58,7 +59,12 @@ Utime.prototype = { return false; } - if(this.getOption('timestampUnit') === 's') { + if(input >= 100000000000000){ + outputtext = "Assuming that this timestamp is in microseconds (1/1,000,000 second)"; + input=Math.round(input/1000); + }else if(input >= 100000000000){ + outputtext = "Assuming that this timestamp is in milliseconds"; + }else{ input = input * 1000; } diff --git a/popup.html b/popup.html index 12ffbe4..de571cf 100644 --- a/popup.html +++ b/popup.html @@ -12,6 +12,7 @@
+
From 05f309250bcd3b8b2c06e9775c68ed86232686ff Mon Sep 17 00:00:00 2001 From: Georgi Ivanov Date: Mon, 19 Jan 2015 17:44:58 +0100 Subject: [PATCH 2/2] Forgot message container --- js/utime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/utime.js b/js/utime.js index 2aedf67..7b211c6 100644 --- a/js/utime.js +++ b/js/utime.js @@ -82,7 +82,7 @@ Utime.prototype = { output += ' ' + date.toString(this.getOption('timeOutputFormat')); } } - + $("#message-container").html(outputtext); return output; },