From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Zefram Newsgroups: gmane.lisp.guile.bugs Subject: bug#26260: ~f SRFI-19 format specifier mishandles one-digit seconds value Date: Sun, 26 Mar 2017 03:09:29 +0100 Message-ID: <20170326020929.GD6453@fysh.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1490494211 3216 195.159.176.226 (26 Mar 2017 02:10:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Mar 2017 02:10:11 +0000 (UTC) To: 26260@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Mar 26 04:10:06 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crxd5-0008Tq-P2 for guile-bugs@m.gmane.org; Sun, 26 Mar 2017 04:10:04 +0200 Original-Received: from localhost ([::1]:39322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crxdB-0000V5-Ei for guile-bugs@m.gmane.org; Sat, 25 Mar 2017 22:10:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crxd6-0000V0-2K for bug-guile@gnu.org; Sat, 25 Mar 2017 22:10:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crxd5-0001TE-5V for bug-guile@gnu.org; Sat, 25 Mar 2017 22:10:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46648) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1crxd4-0001T3-On for bug-guile@gnu.org; Sat, 25 Mar 2017 22:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1crxd4-0006SH-Dn for bug-guile@gnu.org; Sat, 25 Mar 2017 22:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Zefram Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 26 Mar 2017 02:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26260 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.149049418324768 (code B ref -1); Sun, 26 Mar 2017 02:10:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Mar 2017 02:09:43 +0000 Original-Received: from localhost ([127.0.0.1]:44847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crxck-0006RQ-Rk for submit@debbugs.gnu.org; Sat, 25 Mar 2017 22:09:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54043) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crxcj-0006R9-A7 for submit@debbugs.gnu.org; Sat, 25 Mar 2017 22:09:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crxcc-0001Kt-UX for submit@debbugs.gnu.org; Sat, 25 Mar 2017 22:09:35 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43452) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1crxcc-0001Kj-Qo for submit@debbugs.gnu.org; Sat, 25 Mar 2017 22:09:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crxcb-0000TU-Lm for bug-guile@gnu.org; Sat, 25 Mar 2017 22:09:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crxca-0001K0-Si for bug-guile@gnu.org; Sat, 25 Mar 2017 22:09:33 -0400 Original-Received: from river6.fysh.org ([2001:41d0:d:20da::2]:37378 helo=river.fysh.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1crxca-0001Jf-MY for bug-guile@gnu.org; Sat, 25 Mar 2017 22:09:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fysh.org; s=20170316; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=rcPbfIernwin/wg/rkQAUheIFzeDI75NVSZNS9uRluo=; b=kPukW2QThBGt73T10sYmzBdt4b+BHkOO7I1HGGlOACFimOz9UfEA2rgGakX0zV7/3erNoZ25DEoxuE9GA4IyleOT7nJNGqmOBrTSwlp0/sgo2lbUzfDvzixmRPXZEwA1ay7mNWPpyMT7rOymqmzqeeYnZmAYXwUrvlxay0qfXKk=; Original-Received: from zefram by river.fysh.org with local (Exim 4.84_2 #1 (Debian)) id 1crxcX-0007lm-Un; Sun, 26 Mar 2017 03:09:29 +0100 Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8722 Archived-At: The ~f format specifier for SRFI-19's date->string is documented as: # ~f seconds and fractional seconds, with locale # decimal point, eg. `5.2' Let's test that example: scheme@(guile-user)> (use-modules (srfi srfi-19)) scheme@(guile-user)> (date->string (make-date 200000000 5 34 12 26 3 2017 0) "~f") $1 = "05.2" That's not the documented format: the doc and the SRFI itself show "5.2" with no leading padding, but actual behaviour is to zero pad. There is much that is ambiguous in the SRFI's specification of ~f, but with that example it does at least seem clear that there should be no padding there. -zefram