Commit 61646a0f authored by Eric - kg6wxc's avatar Eric - kg6wxc
Browse files

Merge branch 'moreTimezoneFixing' into 'master'

bugfix: yet even more fixes for timezone display.

See merge request !4
parents 1eed246b 8c4a3f99
......@@ -433,7 +433,7 @@ function build_Marker($node_info, $node_ServiceList, $node_LinkedList, $node_Fir
{
//timezone fixes - wxc 11-27-2018
$nodeLastSeen = new DateTime($node_info['last_seen']);
$nodeLastSeen = new DateTime($node_info['last_seen'], $GLOBALS['localTimeZone']);
date_timezone_set($nodeLastSeen, $GLOBALS['localTimeZone']);
......
......@@ -29,8 +29,8 @@ if (!$sql_connection) {
mysqli_close($sql_connection);
}
$localTimeZone = new DateTimeZone($USER_SETTINGS['localTimeZone']);
$nodeInfoLastUpdate = new DateTime($lastUpdateNodeInfo['script_last_run']);
$linkInfoLastUpdate = new DateTime($lastUpdateLinkInfo['table_last_update']);
$nodeInfoLastUpdate = new DateTime($lastUpdateNodeInfo['script_last_run'], $localTimeZone);
$linkInfoLastUpdate = new DateTime($lastUpdateLinkInfo['table_last_update'], $localTimeZone);
date_timezone_set($nodeInfoLastUpdate, $localTimeZone);
date_timezone_set($linkInfoLastUpdate, $localTimeZone);
......
......@@ -47,7 +47,7 @@ if (!isset($_SESSION['userLoggedIn'])) {
echo "</tr>\n";
foreach ($nodeInfo as $value) {
$localTimeZone = new DateTimeZone($USER_SETTINGS['localTimeZone']);
$lastSeen = new DateTime($value['last_seen']);
$lastSeen = new DateTime($value['last_seen'], $localTimeZone);
date_timezone_set($lastSeen, $localTimeZone);
// if ($value['location_fix'] == 0) {
// $yesOrNo = "No";
......
......@@ -295,7 +295,7 @@ if (!isset($_SESSION['userLoggedIn'])) {
echo "</tr>\n";
foreach ($users as $value) {
$localTimeZone = new DateTimeZone($USER_SETTINGS['localTimeZone']);
$lastLogin = new DateTime($value['last_login']);
$lastLogin = new DateTime($value['last_login'], $localTimeZone);
date_timezone_set($lastLogin, $localTimeZone);
/*
if ($value['id'] !== "map-admin") {
......
......@@ -185,7 +185,7 @@ if (is_array($NodeList) && !empty($NodeList))
foreach ($NodeList as $Node)
{
$tz = new DateTimeZone($USER_SETTINGS['localTimeZone']);
$datetime = new DateTime($Node['last_seen']);
$datetime = new DateTime($Node['last_seen'], $tz);
date_timezone_set($datetime, $tz);
$node_FirmwareStatus = checkVersion($Node['firmware_version'], $STABLE_MESH_VERSION);
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment