delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/10/26/06:02:11

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:cc:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=afsGhCHpJwx1Kctyk68qJsxKcTey8ISHZX7GuVGfI3QAoHhAqkkzK
aqDZ+V0K4JmVrGKOmS1m/XyFlALV5EKPfXg4UQK4bTIyD+vv7PzyYp/PX1GfAHap
CydgF34Yhl3xHtMUunuMKsm6vqQYO2A7rjAUdFC6iLk5tKUnxaI22Q=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:cc:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=IzjYSlF54HCnNBnR/IBIqDjmr0I=; b=AzCJL99lAIct4kTw0/XgpucChpaq
diwm3ACgYvg9CxmFBX/PSgh31UyycJO+vv+m+vMtcbkodaWGNVUfpKfiW7D8OpzT
oT5Y3uN37dl40jz86+g5L5JnWPvw4FhHAGA5SonKW7YOG6gxIokJ64l/W7JHNpqJ
A3V18NV2axHgC4U=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
X-HELO: calimero.vinschen.de
Date: Mon, 26 Oct 2015 11:01:48 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Cc: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Subject: Re: Bash unable to print epoch timestamp
Message-ID: <20151026100148.GB31990@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com, Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
References: <loom DOT 20151022T010214-951 AT post DOT gmane DOT org> <loom DOT 20151022T084651-899 AT post DOT gmane DOT org> <20151022084626 DOT GX5319 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20151022084626.GX5319@calimero.vinschen.de>
User-Agent: Mutt/1.5.23 (2014-03-12)

--98e8jtXdkpgskNou
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Brian, ping?

On Oct 22 10:46, Corinna Vinschen wrote:
> Hi Brian,
>=20
> On Oct 22 07:03, Brian Inglis wrote:
> > Brian Inglis <Brian.Inglis <at> SystematicSw.ab.ca> writes:
> >=20
> > >=20
> > > Don Harrop <don <at> effx.us> writes:
> > > > Bash outputs no value when using it's built in method of printing a=
n=20
> > > > "epoch" timestamp.
> > > > BashCommandLine#: printf '%(%s)T' -1
> > >=20
> > > bash printf depends on underlying strftime in newlib, which does not =
support
> > > %s, as it is conditional on _WANT_C99_TIME_FORMATS being defined, and=
 that
> > > is presumably not defined in the config, as %s is not shown in man st=
rftime.=20
> > > Workaround for now is use=20
> > >     date +%s=20
> > > for current time, and=20
> > >    date -d $(printf '%(%T)T' -2) +%s
> > > for shell invocation time.
> >=20
> > > %s, as it is conditional on _WANT_C99_TIME_FORMATS being defined, and=
 that
> > Wrong! Misread the code, strftime %s is not supported!=20
> >=20
> > STC and suggested patch appended (posting from gmane), compiles, but ca=
n't
> > build STC as ld fails with undef refs, and I don't know all the correct
> > LD..., -L and -l incantations. Email me for original files.=20
>=20
> Cool, thanks for the patch.  Unfortunately it doesn't apply cleanly.
> There are several unexpected line wraps and there's this:
>=20
> > --- a/newlib/time/strftime.c        2015-08-20 03:39:24.000000000 -0600
> > +++ b/newlib/time/strftime.c        2015-10-21 20:15:22.367453000 -0600
>=20
> How did this happen?  If you checkout the newlib-cygwin git repo,
> strftime.c is under newlib/libc/time, not under newlib/time :o
>=20
> Would you mind to attach a patch generated with git format-patch?
>=20
>=20
> Thanks in advance,
> Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--98e8jtXdkpgskNou
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWLfoMAAoJEPU2Bp2uRE+gBRkQAKK2q+HZwOuQEC98oZhTkqE0
aPHqvYwaTrXZ9UcXyJRsZPbQNOgwH84PJMKV4Z5poCdvJd6b2eEyQiTOVq0KqaWj
bvkCWVgs/An85kSH1TKyhKrXLj85C5zON0FSxO5/qZ0vbhtGhoudWrsMmT1EZDfF
DJuSSwmOxmtx+g5KBZB/Hpa24cJ9pxh6VNSyddCe+h3l2EvrnKmy8OED6OA6E4JC
EnbC/UG0dwmxjVbViI5VRVhCIrwyFqJurCHLgylfLMk2edHjeBzl7osWTP3kzoPA
zBpQm+jqe+8VxuTU1TKmBIZSMoVQ4ULqE3cnvrKYoRKctJBEPsG6eMinRZp0HzXI
rBCmX8m9chvaN5QktzjPh1PkpniVM+WO3Shl5ZEAbKzrCIz8jOB4q7LDQVaUGSEj
odyBoo4np4UXazh+EejhqOSsigYlcUVK68b9MsS0NsqnX93GA5D0U44aEx4lDxXV
3mV+K0OWHkdbVu9JI2GA+lSMtOHTe5/0LnXKxqjQVoxd0vSO8+GnPG0IVjx56iv4
jfoRxszZuShXjXRyUGamFyzzs2GJC9oRca6N5ysqMZTGGqlZn7WtZrLoJ3S++nIP
0jpWW0aVxz/R4EmRW4kzeqPPKkDr+xHzXl1JP2AM+ZRD+0aW7SUB0CycU+kN/480
VBPAddLGBsUkkHFSvhJB
=6qB3
-----END PGP SIGNATURE-----

--98e8jtXdkpgskNou--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019