dirtdog has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I'm trying to check if the difference between 2 times is greater than 4 hours. I'm using korn shell, but am trying to use a perl one-liner within the shell script to return the value.
One issue is that one of the times i'm using in the calculation is HH only that is stored in a file. The other time is current HH from unix. So for example, if the HH from the file is 00 and the current HH from unix is 20 the diff is 20, but in reality the time diff is only 4.
Normally, I would include an attempted code snippet, but i just can't come up with anything.
any help is greatly appreciated..thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: one liner diff between HH military times
by kennethk (Abbot) on Dec 13, 2013 at 20:05 UTC | |
by dirtdog (Monk) on Dec 16, 2013 at 20:45 UTC | |
by Cristoforo (Curate) on Dec 16, 2013 at 21:49 UTC | |
|
Re: one liner diff between HH military times
by Jim (Curate) on Dec 14, 2013 at 00:03 UTC |