NetBSD Problem Report #57069

From jschauma@netmeister.org  Sat Oct 22 18:11:52 2022
Return-Path: <jschauma@netmeister.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E84E31A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 22 Oct 2022 18:11:51 +0000 (UTC)
Message-Id: <20221022181147.5A9DB85851@panix.netmeister.org>
Date: Sat, 22 Oct 2022 14:11:47 -0400 (EDT)
From: jschauma@netmeister.org
Reply-To: jschauma@netmeister.org
To: gnats-bugs@NetBSD.org
Subject: add '-f input_fmt' flag to date(1)
X-Send-Pr-Version: 3.95

>Number:         57069
>Category:       bin
>Synopsis:       add '-f input_fmt' flag to date(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 22 18:15:00 +0000 2022
>Closed-Date:    Wed Jul 31 17:23:23 +0000 2024
>Last-Modified:  Wed Jul 31 17:23:23 +0000 2024
>Originator:     Jan Schaumann
>Release:        NetBSD 9.3
>Organization:

>Environment:
Architecture: x86_64
Machine: amd64
>Description:

NetBSD's date(1) command currently requires the date to be set to be in
the format [[[[[[CC]yy]mm]dd]HH]MM[.SS]].  Aside from limiting the
date that can be set to be prior to the year 10,000, it also makes it
less flexible and requires the user to convert e.g., an epoch timestamp
into this format before setting the date instead of being able to e.g.,
run

date -f "%s" <epoch date>

Adding this option from e.g., FreeBSD would make that possible.

>How-To-Repeat:
Try to set the date to January 1st, 10,000.
Try to set the date to epoch 1234567890.

>Fix:

Consider taking FreeBSD's '-f' implementation.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Wed, 31 Jul 2024 14:17:48 +0000
State-Changed-Why:
Fixed by christos in rev 1.63


State-Changed-From-To: closed->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Wed, 31 Jul 2024 14:23:53 +0000
State-Changed-Why:
Should this be pulled up to 10 or to 9?


State-Changed-From-To: needs-pullups->closed
State-Changed-By: kre@NetBSD.org
State-Changed-When: Wed, 31 Jul 2024 17:23:23 +0000
State-Changed-Why:
No pullups should be done for this, it is a new feature
addition, which isn't really what generally should be
pulled up.

It wouldn't be needed for -10 anyway, it is already there,
rev 1.63 was Oct 2022, before -10 was branched.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.