title: Why does ServiceStack emit local time even if date was UTC in JSON?
body: <p>Long story short- a date round tripped through ServiceStack.Text's JSON parser loses time zone information. Oddly enough, <code>DateTimeSerializerTests.DateTime_Is_Serialized_As_Utc_and_Deserialized_as_local()</code> seems to expect this behavior, and <code>DateTimeSerializer.Prepare()</code> explicitly calls <code>ToLocalTime()</code> on every date time object that was parsed as UTC!</p>
  
  <p>Here is an example test case (MSTest, but easy enough to run in anything). Local passes, but UTC and Unspecified do not - the kind returned by the DateTime object is always 'Local'.</p>
  
  <pre><code>[TestMethod]
  public void TestParseSingleDateTime_UTC()
  {
      // In canonical UTC format
      var date = "2014-06-03T14:26:20.0030000Z";
      var raw = new DateTime(2014, 6, 3, 14, 26, 20, 3, DateTimeKind.Utc);
      var value = DateTimeSerializer.ParseShortestXsdDateTime(date);
      Assert.AreEqual(DateTimeKind.Utc, value.Kind);
      Assert.AreEqual(raw, value);
  }
  
  [TestMethod]
  public void TestParseSingleDateTime_Local()
  {
      // In local time zone
      var date = "2014-06-02T11:15:49.1480000-05:00";
      var raw = new DateTime(2014, 6, 2, 11, 15, 49, 148, DateTimeKind.Local);
      var value = DateTimeSerializer.ParseShortestXsdDateTime(date);
      Assert.AreEqual(DateTimeKind.Local, value.Kind);
      Assert.AreEqual(raw, value);
  }
  
  [TestMethod]
  public void TestParseSingleDateTime_Unspecified()
  {
      // Unspecified time zone, as we would parse from Excel cells with dates
      var date = "2012-01-06T00:00:00.0000000";
      var raw = new DateTime(2012, 1, 6, 0, 0, 0, DateTimeKind.Unspecified);
      var value = DateTimeSerializer.ParseShortestXsdDateTime(date);
      Assert.AreEqual(DateTimeKind.Unspecified, value.Kind);
      Assert.AreEqual(raw, value);
  }
  </code></pre>
  
  <p>Why on earth is this default behavior? Using <code>JsConfig.AlwaysUseUtc</code> isn't a good workaround here, because then I can't parse a local timestamp as local either.</p>