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:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 22 18:15:00 +0000 2022
>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.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2022 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.