Parse timestamps in UTC for DHCPD leases
This commit is contained in:
parent
407bc6f0d6
commit
5e7f48ad33
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue