DateTimeKind
when possible CS-W1099The DateTime
object has an overload that accepts DateTimeKind
. DateTimeKind
helps indicate whether the time represented
by this instance is based on local time, Coordinated Universal Time (UTC), or neither.
Because this value allows you to introduce uniformity when dealing with DateTime
-s, consider using the appropriate overloads
that accept this value, especially if your application runs across different time zones.
new DateTime(1999, 11, 19, 04, 44, 44);
new DateTime(1999, 11, 19, 04, 44, 44, DateTimeKind.Local);