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 mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to