diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-02 13:25:41 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-02 14:55:36 (EST) |
commit | 75dd10693b6ced4f4d55ce6f374807e306de5783 (patch) | |
tree | 80106808c05e4ef23c72aa26746e09ffb5233c10 /lib | |
parent | da66db89bd5c26c6731b77e3f8616e660529812d (diff) |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/time.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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 |