Skip to content
Permalink
Browse files
Merge branch 'AIRAVATA-2456' into develop
  • Loading branch information
machristie committed Jun 30, 2017
2 parents 9849f3d + c1f3671 commit 91c356a8fff2947e3bf611a9f3bbe58a4cdc3e9b
Showing 1 changed file with 7 additions and 2 deletions.
@@ -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.

0 comments on commit 91c356a

Please sign in to comment.