From 4e294455be06e976131e600fe6eeb2443081159f Mon Sep 17 00:00:00 2001 From: Mattia Mascarello Date: Wed, 9 Oct 2024 23:47:45 +0200 Subject: [PATCH] Actual end date (parsed) on -v --- sleepuntil | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sleepuntil b/sleepuntil index 6c5a4e9..9db29a2 100755 --- a/sleepuntil +++ b/sleepuntil @@ -11,10 +11,11 @@ seconds_until() { # Function to sleep until a given datetime sleep_until() { target="$1" + extended_format=$(date -d "$target" "+%c") # Format datetime into extended format seconds=$(seconds_until "$target") if [ $seconds -gt 0 ]; then if [ "$verbose" == true ]; then - echo "Sleeping until $target..." + echo "Sleeping until $extended_format..." fi sleep $seconds fi