1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-08 10:19:20 +00:00

refactor: standardize epoch time retrieval with get_epoch_seconds and ensure locale-independent string transformations.

This commit is contained in:
Tw93
2026-01-03 18:07:47 +08:00
parent 4efe1411aa
commit 6dfd675417
15 changed files with 79 additions and 41 deletions

View File

@@ -200,7 +200,7 @@ is_cache_valid() {
return 1
fi
local cache_age=$(($(date +%s) - $(get_file_mtime "$cache_file")))
local cache_age=$(($(get_epoch_seconds) - $(get_file_mtime "$cache_file")))
[[ $cache_age -lt $ttl ]]
}