title: How to declare DateTime property with proper DateTimeKind?
body: <p>I want to have something like this:</p>
  
  <pre><code>[Kind=DateTimeKind.Utc]
  public DateTime CreatedOn { get; set; }
  </code></pre>
  
  <p>Is this possible to set Kind declaratively like that? What is a proper syntax? I have stub classes to use in my JSON WCF Webservice and when other end (Java client) get's dates - they all like:</p>
  
  <p>123456000-0500</p>
  
  <p>Where "-0500" is my timezone and if I take only left part then it's not correct UTC date(I have to substract 5 hours). I'd rather fix it on server.</p>
  
  <p><strong>EDIT</strong>: </p>
  
  <ol>
  <li><p>I save all dates in database (SQL Server) as UTC. I never deal with local dates except when need to display it.</p></li>
  <li><p>I have simple class which I pass as response in my WCF service - JSON. When I populate this class - I query database with EF and assign values in this class.</p></li>
  <li><p>On client, which is Android phone with Java - I use Gson library to deserialize. Gson can't deserialize WCF format, so I already wrote my ugly deserializer like this:</p>
  
  <p>public class GsonDateDeserializer implements JsonDeserializer
  {
      public Date deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
      {
          String s = json.getAsString();
          s = s.replace("/Date(", "");
          s = s.replace(")/", "");</p>
  
  <pre><code>    //if there us no data passed in - that means NULL
      if (s.equals("")) return null;
  
      //If we got timezone info with this date - cut it off
      if (s.length() &gt; 5 &amp;&amp; (s.indexOf("-") == s.length()-5 || s.indexOf("+") == s.length()-5))
      {
          s = s.substring(0, s.length()-5);
      }
  
      Long l = Long.valueOf(s);
  
      return new Date(l);
  
  }
  </code></pre>
  
  <p>}</p></li>
  </ol>
  
  <p>I thought that WCF passes "-0500" only for information so client knows which timezone it should be converted to. But no. It passes left number with 5 hours added. So, I don't want server to be "smart" and just want it to pass all dates as "-0000"</p>