title: Date comparison in Client Side considering Timezone - Javascript/Jquery
body: <p>I have a requirement there i need to compare the date with local time. I am setting a Date in DatetimePicker which is in EST DateTime. So i need to compare it with current time and if it is less than current time, I need to show validation alert. Current time in user machine will be of different timezones. So I always need to convert current time zone to to EST time zone before comparing. If current Timezone in user machine in EST,then need to consider the same value and conversion is not required.How can I achieve this in Javascript/Jquery.How can I modify below javascript to handle above case.</p>
  <p>iam setting START_DATE n cshtml page as follows</p>
  <pre><code>  &lt;div class='input-group date' id='datetimepicker1'&gt;
                                  @Html.EditorFor(model =&gt; model.START_DATE, new { htmlAttributes = new { @class = &quot;form-control z-index-0&quot; } })
                                  &lt;span class=&quot;input-group-addon&quot; id=&quot;calenderStart&quot;&gt;
                                      &lt;span class=&quot;glyphicon glyphicon-calendar&quot;&gt;&lt;/span&gt;
                                  &lt;/span&gt;
                              &lt;/div&gt;
  </code></pre>
  <p>In Javascript side...</p>
  <pre><code>var startDate= new Date($(&quot;#START_DATE&quot;).val());
  var currentDateTime= new Date();  //Convert to EST if it is in DifferentTimeZone.Doubt on this part
  if(startDate &lt; currentDateTime)
  {
   alert (&quot;StartDateTime should be greater than current EST DateTime);
  }
  </code></pre>