title: DateTime serializers omitting milliseconds?
body: <p>I've noticed that both JSON.NET and System.Text.Json doesn't serialize the milliseconds of a datetime when the value is <em>zero</em>.</p>
  <p>As in, i see values like: &quot;3000-01-01T00:00:00&quot; (no milliseconds), <em>and</em> &quot;3000-01-01T00:00:00.999&quot;</p>
  <p>Here is a fiddle demonstrating the issue: <a href="https://dotnetfiddle.net/yi47EY" rel="nofollow noreferrer">https://dotnetfiddle.net/yi47EY</a></p>
  <p>The issue is, we have clients that are breaking because they expect a consistent format (e.g always returning milliseconds, even when <code>.000</code>)</p>
  <p>I found this reference: <a href="https://www.w3.org/TR/NOTE-datetime" rel="nofollow noreferrer">https://www.w3.org/TR/NOTE-datetime</a></p>
  <p>Which states:</p>
  <blockquote>
  <p>An adopting standard that permits fractions of a second must specify
  both the minimum number of digits (a number greater than or equal to
  one) and the maximum number of digits (the maximum may be stated to be
  &quot;unlimited&quot;).&quot;</p>
  </blockquote>
  <p>So, does that mean:</p>
  <ol>
  <li>JSON.NET and System.Text.Json is breaking the specification, because we are sending different 'formats'? or</li>
  <li>We are adhering to the specification, but all clients should be <em>flexible</em> to deal with the different formats?</li>
  </ol>