From 75dd10693b6ced4f4d55ce6f374807e306de5783 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 02 Jan 2021 13:25:41 -0500 Subject: ob_*_gmtime(): Don't freeze on New Year's Day And add test cases to confirm the resolution of this bug and the one fixed by commit 83bee70f80d8c98b875c943297b0049eae7d6d22. --- (limited to 'lib') diff --git a/lib/time.sh b/lib/time.sh index 5100b04..910d825 100644 --- a/lib/time.sh +++ b/lib/time.sh @@ -158,7 +158,7 @@ _ob_gmtime() while :; do _ob_is_leap_year ${year} && days_in_year=366 || days_in_year=365 - [ ${timep} -le ${days_in_year} ] && break + [ ${timep} -lt ${days_in_year} ] && break : $((timep -= ${days_in_year})) : $((year += 1)) done -- cgit v0.9.1