diff --git a/docs/standard/datetime/system-text-json-support.md b/docs/standard/datetime/system-text-json-support.md index b52874fa46231..f3c4618c1b5d2 100644 --- a/docs/standard/datetime/system-text-json-support.md +++ b/docs/standard/datetime/system-text-json-support.md @@ -222,4 +222,20 @@ The following levels of granularity are defined for formatting: Used to format a or with fractional seconds and with a local offset. -If present, a maximum of 7 fractional digits are written. This aligns with the implementation, which is limited to this resolution. +If the [round-trip format](../base-types/standard-date-and-time-format-strings.md#the-round-trip-o-o-format-specifier) representation of a + or instance has trailing zeros in its fractional seconds, then +and will format a representation of the instance without trailing zeros. +For example, a instance whose [round-trip format](../base-types/standard-date-and-time-format-strings.md#the-round-trip-o-o-format-specifier) +representation is `2019-04-24T14:50:17.1010000Z`, will be formatted as `2019-04-24T14:50:17.101Z` by +and . + +If the [round-trip format](../base-types/standard-date-and-time-format-strings.md#the-round-trip-o-o-format-specifier) representation of a + or instance has all zeros in its fractional seconds, then +and will format a representation of the instance without fractional seconds. +For example, a instance whose [round-trip format](../base-types/standard-date-and-time-format-strings.md#the-round-trip-o-o-format-specifier) +representation is `2019-04-24T14:50:17.0000000+02:00`, will be formatted as `2019-04-24T14:50:17+02:00` by +and . + +Truncating zeros in fractional-second digits allows the smallest output needed to preserve information on a round trip to be written. + +A maximum of 7 fractional-second digits are written. This aligns with the implementation, which is limited to this resolution.