|
|
@@ -3,7 +3,9 @@
|
|
|
include_once('includes/global_functions.php');
|
|
|
$radioid = $_GET['radioid'];
|
|
|
$radiomac = $_GET['radiomac'];
|
|
|
-
|
|
|
+ $tz = $_GET['tz'];
|
|
|
+
|
|
|
+
|
|
|
if($radioid == "" && $radiomac == ""){
|
|
|
print(json_encode([error => "Not a valid radioid"]));
|
|
|
die();
|
|
|
@@ -20,7 +22,12 @@
|
|
|
$stmt -> bind_result($id, $message, $message, $streamip, $streamurl, $streamport, $tijdstr, $snoozetijd);
|
|
|
while($result = $stmt -> fetch()){
|
|
|
$tijd = strtotime($tijdstr);
|
|
|
- if($tijd < time()){
|
|
|
+
|
|
|
+ $timezone_name = timezone_name_from_abbr('', $tz * 3600, true);
|
|
|
+ $datTimeZoneuser = new DateTimeZone($timezone_name);
|
|
|
+ $time = new DateTime('now', $datTimeZoneuser );
|
|
|
+
|
|
|
+ if($tijd < strtotime($time->format("Y-m-d H:i:s "))){
|
|
|
$tijd = strtotime($tijdstr.' +1 day');
|
|
|
}
|
|
|
array_push($array, array( YYYY=> date("Y", $tijd),
|