mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 23:05:05 +00:00
Improved feature to refresh assume role credentials before it expires
This commit is contained in:
@@ -112,13 +112,12 @@ gnu_convert_date_to_timestamp() {
|
||||
# if [ "$OSTYPE" == "linux-musl" ]; then
|
||||
# date -D "%Y-%m-%dT%H:%M:%SZ" -d "$1" +%s
|
||||
# else
|
||||
date -d "$1" +%s
|
||||
date -u -d "$1" +%s
|
||||
# fi
|
||||
}
|
||||
|
||||
bsd_convert_date_to_timestamp() {
|
||||
echo $(( $(date -j -f %Y-%m-%dT%H:%M:%S "$1" +%s) + 3600 ))
|
||||
# Change above is because epoch time generator in BSD is 1h less than in Linux ¯\_(ツ)_/¯
|
||||
echo $(date -u -j -f %Y-%m-%dT%H:%M:%S "$1" +%s)
|
||||
#date -j -f "%Y-%m-%dT%H:%M:%S" "$1" "+%s"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user