- ## File name substring (ISO-8601 duration from bufferTTL)
- bufferTTL_STR="$(timeDuration "$bufferTTL")" && vbm "DEBUG :$fn:bufferTTL_STR:$bufferTTL_STR";
+ ## Adjust SECONDS so buffer rounds align with time elements
+ ### Advance SECONDS the remainder seconds for dividend timeUntilNextDay, divisor bufferTTL
+ if [[ "$(timeUntilNextDay)" -gt "$bufferTTL" ]]; then
+ vbm "DEBUG :$fn:SECONDS currently :$SECONDS";
+ SECONDS="$(( bufferTTL - ($(timeUntilNextDay) % bufferTTL) ))" && \
+ vbm "DEBUG :$fn:SECONDS advanced to:$SECONDS";
+ vbm "DEBUG :$fn:current time:$(date --iso-8601=seconds)";
+ fi;