Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jul 2012 08:55:18 -0400
From:      Robert Huff <roberthuff@rcn.com>
To:        Matthias Apitz <guru@unixarea.de>
Cc:        freebsd-questions@freebsd.org
Subject:   calculating difference of times
Message-ID:  <20498.36790.654638.359301@jerusalem.litteratus.org>
In-Reply-To: <20120727123429.GA2094@tiny.Sisis.de>
References:  <20120727123429.GA2094@tiny.Sisis.de>

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: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20498.36790.654638.359301>