dotnet / dotnet/roslynator

Analyzer to help prevent the usage of DateTime.Now

Open
#319 4 comments 0 reactions 0 assignees View on GitHub
Area-Analyzers Feature Request
Dominant language
C#
Stars
3.5k
Forks
294
Avg merge
2h 30m
Merged PRs (30d)
4

Description

All of my projects use `DateTime.UtcNow` instead of `DateTime.Now`. It'd be great to see an analyzer to help enforce this.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing Roslynator's existing analyzer entry points and diagnostic tests; the issue names no specific file or test. Done means an analyzer can identify usage of DateTime.Now and support enforcing DateTime.UtcNow, with coverage for the diagnostic behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.