From owner-freebsd-ipfw@freebsd.org Sat May 15 07:16:24 2021 Return-Path: Delivered-To: freebsd-ipfw@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46DD663C331 for ; Sat, 15 May 2021 07:16:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4FhxX81Jcyz4s26 for ; Sat, 15 May 2021 07:16:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 2CD6B63C43F; Sat, 15 May 2021 07:16:24 +0000 (UTC) Delivered-To: ipfw@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C9EF63C6A8 for ; Sat, 15 May 2021 07:16:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FhxX80Dfcz4s8X for ; Sat, 15 May 2021 07:16:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E51BE21353 for ; Sat, 15 May 2021 07:16:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 14F7GNbg063147 for ; Sat, 15 May 2021 07:16:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 14F7GNQn063146 for ipfw@FreeBSD.org; Sat, 15 May 2021 07:16:23 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ipfw@FreeBSD.org Subject: [Bug 255704] Feature Request: ipfw: print time in ISO8601 or allow to pass time format string Date: Sat, 15 May 2021 07:16:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: parv.0zero9+freebsd@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ipfw@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 May 2021 07:16:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255704 parv changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |parv.0zero9+freebsd@gmail.c | |om --- Comment #2 from parv --- As I had noted earlier "[p]arsing ipfw output to convert seconds since Unix epoch in desired time format is too brittle, as output could change dependi= ng on the options passed to ipfw". Compare the output of "ipfw -T list" & "ipfw -aT list"; in the second form, second value from 2nd column to 4th (counting from 1) ... # ipfw -T list | head -n2 00001 1621062170 allow ip from any to any via lo0 00002 0 check-state :default # ipfw -aT list | head -n2 00001 383 15320 1621062170 allow ip from any to any via lo0 00002 0 0 0 check-state :default Further, "0" is an unfortunate value to be present in second-since-Unix-epo= ch column to represent that this rule has not been used yet. Thus it needs to = be treated as a special case -- outside of ipfw -- as time of 1970-01-01 00:00= :00 UTC makes no sense here. As much is evident in "ipfw -t list" output where blanks are printed instead of a date-time value ... # ipfw -t list | head -n2 00001 Fri May 14 21:02:50 2021 allow ip from any to any via lo0 00002 check-state :default --=20 You are receiving this mail because: You are the assignee for the bug.=