diff --git a/utils/user-notify/Makefile b/utils/user-notify/Makefile index 9a33cd4632e345f9a411d222b3ce32ba1f0f4d5b..08acbe92efbc392ec17f30e8b7fa7aa54c3a1f45 100644 --- a/utils/user-notify/Makefile +++ b/utils/user-notify/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=user-notify PKG_VERSION:=61.5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/user-notify.git diff --git a/utils/user-notify/patches/100-add-timezone-to-notifications.patch b/utils/user-notify/patches/100-add-timezone-to-notifications.patch new file mode 100644 index 0000000000000000000000000000000000000000..13cefb058237ff142c3022e0d2c425fcf94225c1 --- /dev/null +++ b/utils/user-notify/patches/100-add-timezone-to-notifications.patch @@ -0,0 +1,40 @@ +From 921787fef2e0142008551ba091aaba2a9c865f83 Mon Sep 17 00:00:00 2001 +From: lathama <lathama@gmail.com> +Date: Sat, 23 Jul 2022 12:50:17 -0600 +Subject: [PATCH] notifier: Add timezone to timestamp in email notification +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Now we get the exact restart time including the timezone. + +It fixes the ambiguity of scheduled restart time, in case there are +multiple Turris devices located within different timezones. + +Closes: #11 + +[Add timezone to cs timestamp as well.] +Co-authored-by: Martin MatÄ›jek <martin.matejek@nic.cz> +--- + src/scripts/notifier | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/scripts/notifier b/src/scripts/notifier +index b35688b..dc78ee8 100755 +--- a/src/scripts/notifier ++++ b/src/scripts/notifier +@@ -160,9 +160,9 @@ schedule_restart() { + + echo "reboot" | at -t "$wanted_time" 2> /dev/null + if [ "$lang" = "cs" ]; then +- echo -e "ZaĹ™ĂzenĂ bude automaticky restartováno dne $($date_cmd '+%d. %m. %Y v %H:%M' -d "$wanted_time").\n" >> "$1" ++ echo -e "ZaĹ™ĂzenĂ bude automaticky restartováno dne $($date_cmd '+%d. %m. %Y v %H:%M %Z' -d "$wanted_time").\n" >> "$1" + else +- echo -e "The device will be restarted automatically on $($date_cmd '+%A, %B %e at %I:%M %p' -d "$wanted_time").\n" >> "$1" ++ echo -e "The device will be restarted automatically on $($date_cmd '+%A, %B %e at %I:%M %p %Z' -d "$wanted_time").\n" >> "$1" + fi + } + +-- +GitLab +