From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B96701F55B; Fri, 5 Jun 2020 22:03:21 +0000 (UTC) Date: Fri, 5 Jun 2020 22:03:21 +0000 From: Eric Wong To: Varun Varada Cc: meta@public-inbox.org Subject: Re: [Patch] Update 24-hour times to use two digits for the hour Message-ID: <20200605220321.GA17860@dcvr> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: Varun Varada wrote: > Hello, > > Here is a patch to update the timestamps displayed to have 2 digits > for the hour when since it is using the 24-hour clock: Hello Varun, thanks for your interest in the project. But why this patch? It's a requirement to document the "why?" for submitting any patch to any project. > # human-friendly format > -sub fmt_ts ($) { strftime('%Y-%m-%d %k:%M', gmtime($_[0])) } > +sub fmt_ts ($) { strftime('%Y-%m-%d %H:%M', gmtime($_[0])) } As a human with degraded eyesight, I see leading zeros from %H as visual noise which makes numbers harder to read. %k uses a leading space instead of zero, but still uses two digits for >=10 hours. Pretty much any digital clock or timer in the real world behaves the same way.