title: Compare Javascript date with php current date
body: <p>I am using the function :</p>
  
  <p><code>var date = new Date();</code></p>
  
  <p>in javascript.  it gives the following output</p>
  
  <p><code>"Sat May 13 2017 22:19:25 GMT+0500 (Pakistan Standard Time)"</code></p>
  
  <p>Now I will embed this date in a URL and on server side , I will receive this date.  On server i have a php script , now in this script i want to compare the date received from javascript client side with current php time and check if the difference between date time zone  sent from javascript client side and current php date time zone is greater than 5 minutes or not .</p>