airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [2/3] airavata-php-gateway git commit: Fixing AIRAVATA-1361 - Local time was being sent to server as GMT. Fixed now.
Date Mon, 04 Jul 2016 07:15:47 GMT
Fixing AIRAVATA-1361 - Local time was being sent to server as GMT. Fixed now.


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

Branch: refs/heads/develop
Commit: d14d073a9e7d6a1535aee827e7a72c283bbab7d2
Parents: 45fa629
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Mon Jul 4 00:10:57 2016 -0700
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Mon Jul 4 00:10:57 2016 -0700

----------------------------------------------------------------------
 app/libraries/ExperimentUtilities.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d14d073a/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 4760181..1b7cf1a 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -984,8 +984,12 @@ class ExperimentUtilities
                         $filters[\Airavata\Model\Experiment\ExperimentSearchFields::APPLICATION_ID]
= $inputs["search-value"];
                         break;
                     case 'creation-time':
-                        $filters[\Airavata\Model\Experiment\ExperimentSearchFields::FROM_DATE]
= strtotime($inputs["from-date"]) * 1000;
-                        $filters[\Airavata\Model\Experiment\ExperimentSearchFields::TO_DATE]
= strtotime($inputs["to-date"]) * 1000;
+                        $timeDifference = Session::get("user_timezone");
+                        $addOrSubtract = "-";
+                        if( $timeDifference > 0)
+                            $addOrSubtract = "+";
+                        $filters[\Airavata\Model\Experiment\ExperimentSearchFields::FROM_DATE]
= strtotime( $addOrSubtract . " " . Session::get("user_timezone") . " hours", strtotime($inputs["from-date"])
) * 1000;
+                        $filters[\Airavata\Model\Experiment\ExperimentSearchFields::TO_DATE]
= strtotime( $addOrSubtract . " " . Session::get("user_timezone") . " hours", strtotime($inputs["to-date"])
) * 1000;
                         break;
                     case '':
                 }


Mime
View raw message