You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/07/24 23:01:54 UTC
airavata-php-gateway git commit: appending the previous commit
Repository: airavata-php-gateway
Updated Branches:
refs/heads/0.15-release-branch 6815f2692 -> 01719c9de
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/0.15-release-branch
Commit: 01719c9de90106143443219b267dbeba3f6e3f67
Parents: 6815f26
Author: Supun Nakandala <sc...@apache.org>
Authored: Fri Jul 24 17:01:27 2015 -0400
Committer: Supun Nakandala <sc...@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") {