info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make check fails on redhat 6.2


From: Larry Jones
Subject: Re: make check fails on redhat 6.2
Date: Thu, 31 May 2001 15:54:33 -0400 (EDT)

Derek R. Price writes:
> 
> Larry, unfortunately, 'date +%z' doesn't appear to be portable, but 'date -u' 
> is
> defined to return UTC by SUS2.  Any objections to something like 'expr 
> abs\(`date
> +%M` - `date -u +%M`\)/10' to grab the minute differential?

Other than the fact that most expr's don't understand abs()?  And that
it doesn't work unless the offset is 0 or 30 minutes?  (If the offset is
negative, you need to add 60, not negate it.)  Also, I'm not sure how
common date -u is -- a quick check here didn't turn up any systems
without it, but it's not in V7 Unix which is my touchstone for *real*
portability.  Fractional timezones are rare enough that I'm not sure
it's worth worrying about, other than noting in TESTS (which I've
already done, but haven't checked in pending the outcome of this
discussion).

> We could probably get the hours exact this way too with a little bit of 
> effort.
> I don't know if that's important to this particular test.

It's somewhat important -- the point of that test (and some of its
neighbors) is to ensure that imported files get timestamped correctly in
the repository.  Right now, they make sure it's at least in the right
ballpark (assuming you're not in a fractional timezone), but it would be
better to check it exactly if there's a highly portable way to do that
that isn't too complicated.

-Larry Jones

I never get to do anything fun. -- Calvin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]