airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [45/50] [abbrv] airavata-php-gateway git commit: appending the previous commit
Date Wed, 29 Jul 2015 17:49:17 GMT
appending the previous commit


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

Branch: refs/heads/master
Commit: 01719c9de90106143443219b267dbeba3f6e3f67
Parents: 6815f26
Author: Supun Nakandala <scnakandala@apache.org>
Authored: Fri Jul 24 17:01:27 2015 -0400
Committer: Supun Nakandala <scnakandala@apache.org>
Committed: Fri Jul 24 17:01:27 2015 -0400

----------------------------------------------------------------------
 app/controllers/AdminController.php | 11 ++---------
 app/libraries/AdminUtilities.php    | 12 ++----------
 2 files changed, 4 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01719c9d/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index ff5df9a..9e72441 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -176,15 +176,8 @@ class AdminController extends BaseController {
     {
         if (Request::ajax()) {
             $inputs = Input::all();
-            date_default_timezone_set('UTC');
-            $fromTime = new DateTime($inputs['fromTime']);
-            $fromTime->setTimezone(new DateTimeZone(Config::get('pga_config.airavata')["time-zone"]));
-            $fromTime = strtotime($fromTime->format('m/d/y H:i'));
-            $toTime = new DateTime($inputs['toTime']);
-            $toTime->setTimezone(new DateTimeZone(Config::get('pga_config.airavata')["time-zone"]));
-            $toTime = strtotime($toTime->format('m/d/y H:i'));
-            $expStatistics = AdminUtilities::get_experiment_execution_statistics($fromTime
* 1000
-                , $toTime * 1000);
+            $expStatistics = AdminUtilities::get_experiment_execution_statistics(strtotime($inputs['fromTime'])
* 1000
+                , strtotime($inputs['toTime']) * 1000);
             return View::make("admin/experiment-statistics", array("expStatistics" =>
$expStatistics));
         }
     }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01719c9d/app/libraries/AdminUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/AdminUtilities.php b/app/libraries/AdminUtilities.php
index 17d0fe3..8cc1a0f 100644
--- a/app/libraries/AdminUtilities.php
+++ b/app/libraries/AdminUtilities.php
@@ -38,17 +38,9 @@ class AdminUtilities
      */
     public static function get_experiments_of_time_range($inputs)
     {
-        date_default_timezone_set('UTC');
-        $fromTime = new DateTime($inputs['from-date']);
-        $fromTime->setTimezone(new DateTimeZone(Config::get('pga_config.airavata')["time-zone"]));
-        $fromTime = strtotime($fromTime->format('m/d/y H:i'));
-        $toTime = new DateTime($inputs['to-date']);
-        $toTime->setTimezone(new DateTimeZone(Config::get('pga_config.airavata')["time-zone"]));
-        $toTime = strtotime($toTime->format('m/d/y H:i'));
-
         $experimentStatistics = AdminUtilities::get_experiment_execution_statistics(
-            $fromTime * 1000,
-            $toTime * 1000
+            strtotime($inputs["from-date"]) * 1000,
+            strtotime($inputs["to-date"]) * 1000
         );
         $experiments = array();
         if ($inputs["status-type"] == "ALL") {


Mime
View raw message