Set explicit timezone in myway observation recording
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -31,7 +31,8 @@
function isDebugServer()
{
- return !isset($_SERVER['SERVER_NAME']) || $_SERVER['SERVER_NAME'] == "10.0.1.154" || $_SERVER['SERVER_NAME'] == "10.1.0.4" || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" ;
+ return isset($_SERVER['SERVER_NAME']) && ( $_SERVER['SERVER_NAME'] == "10.0.1.154" || $_SERVER['SERVER_NAME'] == "10.1.0.4" || $_SERVER['SERVER_NAME'] ==
+"localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1") ;
}
include_once ("common-geo.inc.php");
--- a/labs/myway_timeliness_calculate.php
+++ b/labs/myway_timeliness_calculate.php
@@ -40,8 +40,9 @@
echo "error, route '{$obsv['myway_route']}' unknown";
continue;
}
- // :convert timestamp into time of day and date
- $time = date("H:i:s", strtotime($obsv['time']));
+ // convert timestamp into time of day and date
+// timezones from http://www.postgresql.org/docs/8.0/static/datetime-keywords.html
+ $time = date("H:i:s AESST", strtotime($obsv['time']));
$search_time = date("H:i:s", strtotime($obsv['time'])-(30*60)); // 30 minutes margin
$date = date("c", strtotime($obsv['time']));
$timing_period = service_period(strtotime($date));
--- a/labs/myway_timeliness_route.php
+++ b/labs/myway_timeliness_route.php
@@ -34,6 +34,10 @@
tickFormatter: yformatter
},
grid: { hoverable: true, clickable: true, labelMargin: 32 },
+series: {
+ lines: { show: false },
+ points: { show: true }
+ }
};
var plot = $.plot(placeholder, data, options);
@@ -118,3 +122,4 @@
});
</script>
+
--- a/labs/myway_timeliness_stop.json.php
+++ b/labs/myway_timeliness_stop.json.php
@@ -29,3 +29,4 @@
else echo "[".implode(",",$points)."]";
?>
}
+
--- a/labs/myway_timeliness_stop.php
+++ b/labs/myway_timeliness_stop.php
@@ -40,6 +40,10 @@
tickFormatter: yformatter
},
grid: { hoverable: true, clickable: true, labelMargin: 32 },
+ series: {
+ lines: { show: false },
+ points: { show: true }
+ }
};
var plot = $.plot(placeholder, data, options);
@@ -129,3 +133,4 @@
});
</script>
+