title: How do you preserve a JavaScript date's time zone from browser to server, and back?
body: <p>For example, using a date and time control, the user selects a date and time, such that the string representation is the following:</p>
  
  <pre><code>"6-25-2012 12:00:00 PM"
  </code></pre>
  
  <p>It so happens that this user is in the EST time zone. The string is passed to the server, which translates it into a .NET DateTime object, and then stores it in SQL Server in a datetime column.</p>
  
  <p>When the date is returned later to the browser, it needs to be converted back into a date, however when the above string is fed into a date it is losing 4 hours of time. I believe this is because when not specifying a timezone while creating a JavaScript date, it defaults to local time, and since EST is -400 from GMT, it subtracts 4 hours from 12pm, even though that 12pm was meant to be specified as EST when the user selected it on a machine in the EST time zone.</p>
  
  <p>Clearly something needs to be added to the original datetime string before its passed to the server to be persisted. What is the recommended way of doing this?</p>