Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jul 2012 08:55:18 -0400
From:      Robert Huff <>
To:        Matthias Apitz <>
Subject:   calculating difference of times
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

Matthias Apitz writes:

>  Do we have something (in the ports) to calculate easy the
>  difference of two times given as hh:mm - hh:mm? Some hack in
>  bc(1) or something like this? Well, I could translate the times
>  into UNIX seconds of epoche, build the diff and reconvert, but
>  something more easy (and not in Perl or C, just shell); thanks

	I don't know if there's something already available. (Sorry -
never had this problem.)
	If the format is fixed, then parsing it with awk is trivial.
After that, the math should be doable with "expr".

				Robert Huff

Want to link to this message? Use this URL: <>