rspec/rules/S6562/impact-dotnet.adoc

4 lines
425 B
Plaintext

=== What is the potential impact?
Creating the `DateTime` object without specifying the property `Kind` will set it to the default value of `DateTimeKind.Unspecified`. In this case, calling the method `ToUniversalTime` will assume that `Kind` is `DateTimeKind.Local` and calling the method `ToLocalTime` will assume that it's `DateTimeKind.Utc`.
As a result, you might have mismatched `DateTime` objects in your application.