IntelliTect/CodingGuidelines

Add an analyzer to ban implicit conversions between DateTime and DateTimeOffset.

Closed this issue · 1 comments

This has bit me too many times. Behavior will often times appear correct during local development when all code is running in the same time zone, but then fails in deployed environments if for example a web server's time zone is UTC.

See also:

@adamskt FWIW, this is on track to be [Obsolete]'d in .NET 7. dotnet/runtime/57207