airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [1/2] airavata-php-gateway git commit: Fix for Timestamp issue in JobDetails
Date Tue, 26 Jan 2016 17:46:47 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 6c04ff385 -> e7eaded52


Fix for Timestamp issue in JobDetails


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/b43b9e09
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/b43b9e09
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/b43b9e09

Branch: refs/heads/develop
Commit: b43b9e093026668d5a73ee74d97b8ef256d79f22
Parents: ef5af42
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Tue Jan 26 12:44:51 2016 -0500
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Tue Jan 26 12:44:51 2016 -0500

----------------------------------------------------------------------
 app/views/partials/experiment-info.blade.php | 2 +-
 public/js/time-conversion.js                 | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b43b9e09/app/views/partials/experiment-info.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-info.blade.php b/app/views/partials/experiment-info.blade.php
index cb6ec26..8b86721 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -53,7 +53,7 @@
                 <th>Job Name : {{$jobDetail->jobName}}</th>
                 <td>Job ID : {{ $jobDetail->jobId}}</td>
                 <td> Status : {{$jobDetail->jobStatus->jobStateName }}</td>
-                <td> Creation Time : {{ date("F j, Y, g:i a", $jobDetail->creationTime
)}}</td>
+                <td> Creation Time : <span class="time" unix-time="{{$jobDetail->creationTime}}"></span></td>
             </tr>
         @endforeach
         <!--

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b43b9e09/public/js/time-conversion.js
----------------------------------------------------------------------
diff --git a/public/js/time-conversion.js b/public/js/time-conversion.js
index fb0ba54..459d6a4 100644
--- a/public/js/time-conversion.js
+++ b/public/js/time-conversion.js
@@ -2,7 +2,9 @@
 //<td> elements should have the unix time as an attribute e.g. <td class="time"
unix-time="423423423524"></td>
 
 function convertTimestamp(timestamp) {
-    var d = new Date(timestamp * 1000),	// Convert the passed timestamp to milliseconds
+    if( timestamp.length <= 10)
+        timestamp = timestamp * 1000;// Convert the passed timestamp to milliseconds    
+    var d = new Date( parseInt( timestamp) ),
         yyyy = d.getFullYear(),
         mm = ('0' + (d.getMonth() + 1)).slice(-2),	// Months are zero based. Add leading
0.
         dd = ('0' + d.getDate()).slice(-2),			// Add leading 0.


Mime
View raw message