Correct the analog hour calculation.

"date %I" returns a number between 1 and 12 and we want 12 to be 0.
This commit is contained in:
Anthony Gelibert 2014-01-31 21:39:00 +01:00
parent 2e9cfa2e3c
commit 73a42ba856

View File

@ -1512,8 +1512,8 @@ _lp_time_analog()
local -a half local -a half
half=(🕜 🕝 🕞 🕟 🕠 🕡 🕢 🕣 🕤 🕥 🕦 🕧 ) half=(🕜 🕝 🕞 🕟 🕠 🕡 🕢 🕣 🕤 🕥 🕦 🕧 )
# array index starts at 0 # "date %I" returns a number between 1 and 12 and we want 12 to be 0.
local -i hi=hour-1 local -i hi=$(( hour % 12))
# add a space for correct alignment # add a space for correct alignment
if (( min < 15 )) ; then if (( min < 15 )) ; then