Fix S6354 FN: Rule does not raise an issue when DateTimeOffset is used #5434
Labels
Area: C#
C# rules related issues.
Area: VB.NET
VB.NET rules related issues.
Type: False Negative
Rule is NOT triggered when it should be.
Projects
Milestone
Description
S6354 should also raise issues when
DateTimeOffset.Now
andDateTimeOffset.UtcNow
are used.Originally the issue was reported by community: https://community.sonarsource.com/t/rule-use-a-testable-date-time-provider-does-not-flag-datetimeoffset/58667
Repro steps
Use either
DateTimeOffset.Now
orDateTimeOffset.UtcNow
and see that no issues are raised.Expected behavior
An issue is rasied
Actual behavior
No issue is raised by rule S6354.
Known workarounds
None
Related information
The text was updated successfully, but these errors were encountered: