On Thu, 17 Jul 2025, [email protected] wrote:
Video durations are formatted in youtube's .info.json files as "HH:MM:SS"; so, I went monkey and did the conversion myself, but I got two errors which I can't make sense of whatsoever with only two values:_HHMMSS="19:09" _HHMMSS="19:08" IFS=$(echo -en "\n\b"); _SEKNDS_AR=($(echo "${_HHMMSS}" | tr ':' '\n')); _SEKNDS_ARL=${#_SEKNDS_AR[@]} if [[ ${_SEKNDS_ARL} -eq 2 ]]; then _SEKNDS=$(( 60 * ${_SEKNDS_AR[0]} )); _SEKNDS=$(( _SEKNDS + ${_SEKNDS_AR[1]} )) echo "// __ \$_SEKNDS: |${_SEKNDS}|" fi bash: _SEKNDS + 08: value too great for base (error token is "08") ~ yet, it works for _HHMMSS={"3:54:14", "20:01", "20:00", "19:07", "19:06", "19:05", ... } and all other similar conversion?! lbrtchx
Not sure about posix but: date -u -d '1/1/70 12:08' '+%s' 43680

