Skip to content

Commit 64b9b2c

Browse files
authored
Merge pull request #842 from AbsaOSS/fix/clean-up-script-fix-date-command
cleanUpRuns.sh - date fix
2 parents c338238 + aa6b2ec commit 64b9b2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/resources/db_scripts/housekeeping/cleanUpRuns.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ else
6262
obtain_lock_time_response=$(psql -X $connection_url -c "SELECT started_at FROM housekeepinglock;" 2>&1)
6363

6464
timestamp_string=$(echo "$obtain_lock_time_response" | grep -oE '[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}')
65-
timestamp_unix=$(date -jf "%Y-%m-%d %H:%M:%S" "$timestamp_string" +%s)
65+
timestamp_unix=$(date -d "$timestamp_string" +%s)
6666
current_unix=$(date +%s)
6767
time_difference=$((current_unix - timestamp_unix))
6868
days_difference=$((time_difference / 86400))

0 commit comments

Comments
 (0)