From 686e8f89da0c762595f606f4e21ac89fbbe0e9a4 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Tue, 14 Aug 2018 21:20:00 -0700 Subject: [PATCH] Avoid perl warnings --- time/time-lib.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/time/time-lib.pl b/time/time-lib.pl index 965067526..9ac320af8 100755 --- a/time/time-lib.pl +++ b/time/time-lib.pl @@ -244,7 +244,7 @@ return undef; sub number_to_weekday { -return ucfirst($weekday_names[$_[0]]); +return defined($_[0]) ? ucfirst($weekday_names[$_[0]]) : undef; } # Returns 1 if this system supports setting the hardware clock.