You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/06/30 12:41:36 UTC

[1/2] airavata-php-gateway git commit: AIRAVATA-2456 Handle fractional seconds in unix time

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 9849f3d10 -> 91c356a8f


AIRAVATA-2456 Handle fractional seconds in unix time


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/c1f36710
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/c1f36710
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/c1f36710

Branch: refs/heads/develop
Commit: c1f36710a7dc5287658c0203b2a69a42563461c6
Parents: ff9a184
Author: Marcus Christie <ma...@iu.edu>
Authored: Fri Jun 30 08:39:11 2017 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Fri Jun 30 08:39:11 2017 -0400

----------------------------------------------------------------------
 public/js/time-conversion.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/c1f36710/public/js/time-conversion.js
----------------------------------------------------------------------
diff --git a/public/js/time-conversion.js b/public/js/time-conversion.js
index 04eea52..49e7de5 100644
--- a/public/js/time-conversion.js
+++ b/public/js/time-conversion.js
@@ -6,8 +6,13 @@ function convertTimestamp(timestamp) {
         return;
     else
         timestamp = $.trim( timestamp);
-    if( timestamp.length <= 10)
-        timestamp = timestamp * 1000;// Convert the passed timestamp to milliseconds    
+    timestamp = parseFloat( timestamp );
+    if( isNaN( timestamp ) ){
+        return;
+    }
+    // If timestamp is a number of seconds, convert it to milliseconds
+    if( timestamp < Math.pow(2, 32) )
+        timestamp = timestamp * 1000;
     var d = new Date( parseInt( timestamp) ),
         yyyy = d.getFullYear(),
         mm = ('0' + (d.getMonth() + 1)).slice(-2),	// Months are zero based. Add leading 0.


[2/2] airavata-php-gateway git commit: Merge branch 'AIRAVATA-2456' into develop

Posted by ma...@apache.org.
Merge branch 'AIRAVATA-2456' into develop


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/91c356a8
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/91c356a8
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/91c356a8

Branch: refs/heads/develop
Commit: 91c356a8fff2947e3bf611a9f3bbe58a4cdc3e9b
Parents: 9849f3d c1f3671
Author: Marcus Christie <ma...@iu.edu>
Authored: Fri Jun 30 08:41:24 2017 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Fri Jun 30 08:41:24 2017 -0400

----------------------------------------------------------------------
 public/js/time-conversion.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------