Private GIT

Skip to content
Snippets Groups Projects
Commit 180a4c67 authored by Benoît Sauveton's avatar Benoît Sauveton
Browse files

correction of centreonUtils class getDateTimeTimestamp method

parent 32441f64
Branches
Tags
No related merge requests found
...@@ -115,6 +115,7 @@ class CentreonUtils ...@@ -115,6 +115,7 @@ class CentreonUtils
if (!isset($centreonGmt)) { if (!isset($centreonGmt)) {
$centreonGmt = new CentreonGMT($db); $centreonGmt = new CentreonGMT($db);
} }
$centreonGmt->getMyGMTFromSession(session_id(), $db);
$datetime = trim($datetime); $datetime = trim($datetime);
$res = explode(" ", $datetime); $res = explode(" ", $datetime);
if (count($res) != 2) { if (count($res) != 2) {
...@@ -128,8 +129,7 @@ class CentreonUtils ...@@ -128,8 +129,7 @@ class CentreonUtils
if (count($res2) != 2) { if (count($res2) != 2) {
throw new Exception($invalidString); throw new Exception($invalidString);
} }
$timestamp = mktime($res2[0], $res2[1], "0", $res1[1], $res1[2], $res1[0]); $timestamp = $centreonGmt->getUTCDateFromString($datetime);
$timestamp = $centreonGmt->getUTCDate($timestamp);
return $timestamp; return $timestamp;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment