Parse timestamps in UTC for DHCPD leases

This commit is contained in:
Tony Blyler 2021-05-11 09:42:08 -04:00
parent 407bc6f0d6
commit 5e7f48ad33

View file

@ -32,7 +32,7 @@ readonly DHCPD_CONF_FILE_AWK_SCRIPT
DHCPD_LEASES_FILE_AWK_SCRIPT=$(cat << 'EOF' DHCPD_LEASES_FILE_AWK_SCRIPT=$(cat << 'EOF'
function parse_datetime(datetime) { function parse_datetime(datetime) {
command = "date -j -f \"%w %Y/%m/%d %H:%M:%S %Z;\" +%s \"" datetime "\"" command = "TZ=UTC date -j -f \"%w %Y/%m/%d %H:%M:%S %Z;\" +%s \"" datetime "\""
if (command | getline unix_time < 0) { if (command | getline unix_time < 0) {
exit 1 exit 1
} }