GNU bug report logs - #29589
date %k adds extra space for single digits hours

Previous Next

Package: coreutils;

Reported by: Noam Arad <noam.arad <at> kaltura.com>

Date: Wed, 6 Dec 2017 16:39:01 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Noam Arad <noam.arad <at> kaltura.com>
To: "bug-coreutils <at> gnu.org" <bug-coreutils <at> gnu.org>
Subject: date %k adds extra space for single digits hours
Date: Wed, 6 Dec 2017 09:17:12 +0000
[Message part 1 (text/plain, inline)]
When using date command with the format %k if the hour is single digits there is an extra space added.
E.g.: date -u +"%Y/%m/%d %k:%M:%S" when run at "2017/12/06 9:16:26" will give the output "2017/12/06  9:16:26"
NOTE: there are two spaces between "06" and "9".

Thanks
[Message part 2 (text/html, inline)]

This bug report was last modified 6 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.