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:
parent
2e9cfa2e3c
commit
73a42ba856
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user