How to calculate the time difference?
<p>How can i do the calculation to get the time difference. I have both the time of the server and the time of the client system in <code>isoDate</code> date format. Here are the output data i have :</p>

<p>Server time which is in UTC converted to local sytem timezone time : </p>

<p><code>Tue May 22 2012 14:29:51 GMT+0530 (India Standard Time)</code></p>

<p>Local System Time : </p>

<p><code>Tue May 22 2012 14:31:51 GMT+0530 (India Standard Time)</code></p>

<p>I want to do the calculation in such a way that if the local system time is less then or greater then say 5 min (configurable value) ignoring the difference in seconds compared to what the server time is showing want to perform some task else another task. I dont know how to do the calculation because when it is midnight 12:01 am according to the server time then the date, hour and minute changes whereas if the local system is just 4 min behind how to determine the difference is not less then 5 min although the date changed. My main idea is to check everything to match date, time and check the difference. Please help.</p>
