[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] Re: remove GNU date dependency [Was: quilt mail broken with
From: |
Andreas Gruenbacher |
Subject: |
[Quilt-dev] Re: remove GNU date dependency [Was: quilt mail broken with sed 3.02] |
Date: |
Wed, 1 Feb 2006 04:19:04 +0100 |
User-agent: |
KMail/1.8.2 |
Gary,
I've looked into this a little, and standard date(1) doesn't have the -d
option, and doesn't support `%s' and `%z'. We could get of the first use of
-d, but incrementing timestamps is harder, and I'd hate to have to sleep a
second between each date generated just to get a different timestamp. We
could put the same timestamp in each message in case we can't increment, but
then, we still can't generate `%z'. The Perl workaround also relies on
strftime(3), which probably is the platform's native libc implementation, and
so probably has the same limitations as date(1).
The following snipped computes %z in shell code, but this doesn't solve the
increment-timestamp problem.
zone_offset=
while [ "${zone_offset%0}" = "$zone_offset" ]
do
zone_offset=$(( 9$(date '+%H%M') - 9$(date -u '+%H%M') ))
done
printf '+%04d\n' $zone_offset
So I think I'll go with 0.43 even though this portability issue is not fixed.
Andreas
- [Quilt-dev] quilt mail broken with sed 3.02, Jean Delvare, 2006/01/30
- Re: [Quilt-dev] quilt mail broken with sed 3.02, Andreas Gruenbacher, 2006/01/30
- Re: [Quilt-dev] quilt mail broken with sed 3.02, Jean Delvare, 2006/01/30
- Re: [Quilt-dev] quilt mail broken with sed 3.02, Andreas Gruenbacher, 2006/01/30
- Re: [Quilt-dev] quilt mail broken with sed 3.02, Jean Delvare, 2006/01/30
- Re: [Quilt-dev] quilt mail broken with sed 3.02, Andreas Gruenbacher, 2006/01/30
- Re: [Quilt-dev] quilt mail broken with sed 3.02, Andreas Gruenbacher, 2006/01/30
- Re: [Quilt-dev] quilt mail broken with sed 3.02, Jean Delvare, 2006/01/30
- [Quilt-dev] remove GNU date dependency [Was: quilt mail broken with sed 3.02], Gary V. Vaughan, 2006/01/31
- [Quilt-dev] Re: remove GNU date dependency [Was: quilt mail broken with sed 3.02], Andreas Gruenbacher, 2006/01/31
- [Quilt-dev] Re: remove GNU date dependency [Was: quilt mail broken with sed 3.02],
Andreas Gruenbacher <=
- Re: [Quilt-dev] quilt mail broken with sed 3.02, Gary V. Vaughan, 2006/01/31
- Re: [Quilt-dev] quilt mail broken with sed 3.02, Andreas Gruenbacher, 2006/01/31
- Re: [Quilt-dev] quilt mail broken with sed 3.02, John Vandenberg, 2006/01/31
- Re: [Quilt-dev] quilt mail broken with sed 3.02, Andreas Gruenbacher, 2006/01/31