Date difference #187
Sboshoff76
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
I'll address this properly later, but a quick response for now to show I've seen your post. Currently there's the
Though that's just an either/or, either the update is older that N days or not. But with some rewrites that could instead/also list how old or when the image was released (with an additional flag, like The current code is: datecheck() {
ImageDate=$("$regbin" -v error image inspect "$RepoUrl" --format='{{.Created}}' | cut -d" " -f1)
ImageEpoch=$(date -d "$ImageDate" +%s 2>/dev/null) || ImageEpoch=$(date -f "%Y-%m-%d" -j "$ImageDate" +%s)
ImageAge=$(( ( $(date +%s) - ImageEpoch )/86400 ))
if [[ "$ImageAge" -gt "$DaysOld" ]]; then
return 0
else
return 1
fi
} I'll revisit this in the future! Currently occupied with other issues. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I read about the challenge of pulling digest and version data for current vs updated images.. so not expecting that; but would just the date or age data be easier to display?
Beta Was this translation helpful? Give feedback.
All reactions