unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#26121: guile-2.2.0: date -d argument problem
@ 2017-03-16  9:27 Thomas Klausner
  2018-02-01  6:12 ` ITOH Yasufumi
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Klausner @ 2017-03-16  9:27 UTC (permalink / raw)
  To: 26121

Hi!

When building guile-2.2.0 on NetBSD, I see:

gmake[2]: Entering directory '/scratch/lang/guile21/work/guile-2.2.0/libguile'
date: Expected digit in canonical time
date: -d
date: ^
Usage: date [-ajnu] [-d date] [-r seconds] [+format] [[[[[[CC]yy]mm]dd]HH]MM[.SS]]
  GEN      libpath.h

 Thomas





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#26121: guile-2.2.0: date -d argument problem
  2017-03-16  9:27 bug#26121: guile-2.2.0: date -d argument problem Thomas Klausner
@ 2018-02-01  6:12 ` ITOH Yasufumi
  0 siblings, 0 replies; 2+ messages in thread
From: ITOH Yasufumi @ 2018-02-01  6:12 UTC (permalink / raw)
  To: 26121

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
 





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-01  6:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).