Closed mary-georgiou-sonarsource closed 1 year ago
Implement new rule S6588: Use DateTime(Offset).UnixEpoch instead of pointing to that date using the constructor.
This rule should raise when a new DateTime, DateTimeOffset or DateOnly object is created with Date 1-1-1970.
DateTime
DateTimeOffset
DateOnly
The rule should not cover DateOnly, because it does not have a UnixEpoch field that could be used instead.
Implement new rule S6588: Use DateTime(Offset).UnixEpoch instead of pointing to that date using the constructor.
This rule should raise when a new
DateTime
,DateTimeOffset
orDateOnly
object is created with Date 1-1-1970.