unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: itohy@netbsd.org (ITOH Yasufumi)
To: 26121@debbugs.gnu.org
Subject: bug#26121: guile-2.2.0: date -d argument problem
Date: Thu, 1 Feb 2018 15:12:58 +0900	[thread overview]
Message-ID: <20180201082149.BCFAC7464EF@idyll.hauN.org> (raw)
In-Reply-To: <20170316092719.hceyr2efulgmtzig@danbala>

Hello,
date options should precede the format string.

% date -u +'%Y-%m-%d %T' -d @100000
date: Expected digit in canonical time
date: -d
date: ^
Usage: date [-ajnu] [-d date] [-r seconds] [+format] [[[[[[CC]yy]mm]dd]HH]MM[.SS]]
% date -u -d @100000 +'%Y-%m-%d %T'
1970-01-02 03:46:40

Possibly the first example is trying to set the system time to '-d'.

Here's patch to guile-2.0.14.
Thanks,

--- libguile/Makefile.am.orig	2016-12-15 09:03:33.000000000 +0900
+++ libguile/Makefile.am	2018-02-01 05:47:59.438589465 +0900
@@ -722,7 +722,7 @@
 	@echo '	{ "LIBS",	   "@GUILE_LIBS@" }, \' >> libpath.tmp
 	@echo '	{ "CFLAGS",	   "@GUILE_CFLAGS@" }, \' >> libpath.tmp
 	@BUILD_DATE="$${SOURCE_DATE_EPOCH:-`date '+%s'`}" ; \
-	 echo '	{ "buildstamp",    "'`date -u +'%Y-%m-%d %T' -d @$$BUILD_DATE`'" }, \' >> libpath.tmp
+	 echo '	{ "buildstamp",    "'`date -u -d @$$BUILD_DATE +'%Y-%m-%d %T'`'" }, \' >> libpath.tmp
 	@echo '}' >> libpath.tmp
 	$(AM_V_GEN)mv libpath.tmp libpath.h
 





      reply	other threads:[~2018-02-01  6:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16  9:27 bug#26121: guile-2.2.0: date -d argument problem Thomas Klausner
2018-02-01  6:12 ` ITOH Yasufumi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180201082149.BCFAC7464EF@idyll.hauN.org \
    --to=itohy@netbsd.org \
    --cc=26121@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).