Install Date [Convert Time]: Remove leading zero from output

The leading zero in some ls output caused bash to interpret the output
as octal numbers, leading to the "value too great for base" error like
the AIX/IRIX uptime.
This commit is contained in:
Muhammad Herdiansyah 2017-07-18 14:31:46 +07:00
parent c4c6afeaf1
commit b811d521a1
1 changed files with 1 additions and 1 deletions

View File

@ -3838,7 +3838,7 @@ cache_uname() {
convert_time() {
# Convert ls timestamp to 'Tue 06 Dec 2016 4:58 PM' format.
year="$1"
day="$3"
day="${3#0}"
# Split time into hours/minutes.
hour="${4/:*}"