From a27a5deadcc260645c28dbb8be7b52c1d8a8cddc Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Fri, 10 Jun 2022 08:35:04 -0400 Subject: [PATCH 1/4] Update config.php --- scripts/config.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/scripts/config.php b/scripts/config.php index 233d05b..0747362 100644 --- a/scripts/config.php +++ b/scripts/config.php @@ -24,6 +24,7 @@ if(isset($_GET["latitude"])){ $flickr_api_key = $_GET['flickr_api_key']; $flickr_filter_email = $_GET["flickr_filter_email"]; $language = $_GET["language"]; + $timezone = $_GET["timezone"]; if(isset($_GET['apprise_notify_each_detection'])) { $apprise_notify_each_detection = 1; @@ -36,6 +37,10 @@ if(isset($_GET["latitude"])){ $apprise_notify_new_species = 0; } + if(isset($timezone)) { + shell_exec("sudo timedatectl set-timezone ".$timezone); + } + // logic for setting the date and time based on user inputs from the form below if(isset($_GET['date']) && isset($_GET['time'])) { // can't set the date manually if it's getting it from the internet, disable ntp @@ -272,7 +277,22 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken} If connected to the internet, retrieve time automatically? >
> - > + >
+ + +


From fd65ef6e6cc2aaa03eba301fb2a2547d9b50d119 Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Fri, 10 Jun 2022 08:42:37 -0400 Subject: [PATCH 2/4] show selected timezone --- scripts/config.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/config.php b/scripts/config.php index 0747362..0ed2036 100644 --- a/scripts/config.php +++ b/scripts/config.php @@ -284,11 +284,16 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken} Select a timezone ".$timezone_identifiers[$i].""; + $isSelected = ""; + if($timezone_identifiers[$i] == $current_timezone) { + $isSelected = 'selected="selected"'; + } + echo ""; } ?> From 6f09d9fb7c5cfead1187ca2ba7a771bb2deb720e Mon Sep 17 00:00:00 2001 From: mcguirepr89 Date: Fri, 10 Jun 2022 08:58:40 -0400 Subject: [PATCH 3/4] removed question mark from flicker user line --- scripts/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/config.php b/scripts/config.php index 0ed2036..dde9d52 100644 --- a/scripts/config.php +++ b/scripts/config.php @@ -195,7 +195,7 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}

Bird Photos from Flickr


- +

Set your Flickr API key to enable the display of bird images next to detections. Get your free key here.

Localization

From 1407b718b1df983a76fc69116521f39af3ee3662 Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Fri, 10 Jun 2022 09:47:49 -0400 Subject: [PATCH 4/4] Update config.php --- scripts/config.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/config.php b/scripts/config.php index dde9d52..159f8e4 100644 --- a/scripts/config.php +++ b/scripts/config.php @@ -13,6 +13,11 @@ function syslog_shell_exec($cmd, $sudo_user = null) { } } +if(isset($_GET['restart_php']) && $_GET['restart_php'] == "true") { + shell_exec("sudo service php7.4-fpm restart"); + die(); +} + # Basic Settings if(isset($_GET["latitude"])){ $latitude = $_GET["latitude"]; @@ -39,6 +44,13 @@ if(isset($_GET["latitude"])){ if(isset($timezone)) { shell_exec("sudo timedatectl set-timezone ".$timezone); + date_default_timezone_set($timezone); + echo ""; } // logic for setting the date and time based on user inputs from the form below