title: Passing javascript date to java
body: <p>I store dates on server side in UTC timezone.
  When client (browser) wants to pass some date to server it sends date like</p>
  
  <pre><code>"Tue Jan 03 2012 16:50:32 GMT+0400 (Russian Standard Time)"
  </code></pre>
  
  <ol>
  <li>Is this format standard across all browsers?</li>
  <li>If 1. is false, how can I redefine the <code>Date</code> format function? Is this a good practice? </li>
  <li>How can I convert JS <code>Date</code>s to a UTC <code>java.util.Date</code> with <code>java.text.SimpleDateFormat</code>?</li>
  </ol>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I thought that passing date as formatted string (with timezone part) will cause less headache since I shouldn't bother to convert dates to UTC on client side. So I avoid any date conversions in JS code.</p>