title: .net DateTime to JavaScript Date
body: <p>I have an MVC5 Web Application as web interface for my time recording app.
  My android app sends its times as string to server, there I parse them to .NET DateTime and store it in Database.
  When I load the time records again and create a JavaScript array I get one additional hour added.
  I already tried a lot but this post seems to solve the problem:
  <a href="https://stackoverflow.com/questions/8945029/converting-date-to-gmt-0">stackoverflow</a></p>
  
  <pre><code>new Date(date.valueOf() + date.getTimezoneOffset() * 60000);
  </code></pre>
  
  <p>My question is:
  Is this the correct way to do? I don’t need any culture or time zones for time recording. A time record that starts at 6 am and ends at 6pm has always this values. Actually it even MUST have this values!
  Isn’t there a way to tell the JavaScript Date that it should do nothing with my time? Just hold the value I set to it?</p>
  
  <p>UPDATE/Extension:
  My web inteterface is a MVC5 application and the communication with android phones is done with a WCF service. 
  To make the the code I posted above run I kicked out the JavaScriptSerializer and wrote the JSON array with StringBuilder. This gave me the possibility to include the snipped posted above and let it be executed on the client.
  I also tried all DateTime.Kind's (local, unspecified and UTC) in combination with the JavascriptSerializer but with no success.</p>
  
  <p>Again, I need unmodified datetimes on client side.</p>
  
  <p>With the answer of Matt I now see three options:</p>
  
  <ol>
  <li>My code posted above</li>
  <li>Parsing the DateTime and append a Z for GMT</li>
  <li>Add SerializerSettings.DateTimeZoneHandling in Global.ascx Application_Start.</li>
  </ol>
  
  <p>Cheers,
  Stefan</p>