reresolve-dns: use $EPOCHSECONDS instead of $(date +%s)

Alexis gg alexisgandroid at gmail.com
Sat Feb 12 02:20:39 UTC 2022


This commit breaks everything on older OSes (esp. Centos 7):
https://git.zx2c4.com/wireguard-tools/commit/?id=1fd95708391088742c139010cc6b821add941dec

There is no check on the bash's version, the built-in variable
$EPOCHSECONDS is available only from bash 5.
https://lists.gnu.org/archive/html/info-gnu/2019-01/msg00010.html

This isn't an improvement, $(date +%s) is stable from much older
versions and will stay stable in future bash versions.


More information about the WireGuard mailing list