Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Analyzer] Use DateTime.UtcNow vs DateTime.Now #27187

Open
PureWeen opened this issue Jan 16, 2025 · 0 comments
Open

[Analyzer] Use DateTime.UtcNow vs DateTime.Now #27187

PureWeen opened this issue Jan 16, 2025 · 0 comments
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging proposal/open
Milestone

Comments

@PureWeen
Copy link
Member

Description

DateTime.Now has a non-insignificant load time when first called because it has to load all the timezones and then even after that it has to perform math operations.

If you're able to use DateTime.UtcNow that's going to perform better overall

@dotnet-policy-service dotnet-policy-service bot added the s/triaged Issue has been reviewed label Jan 16, 2025
@PureWeen PureWeen added area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging and removed s/triaged Issue has been reviewed labels Jan 16, 2025
@StephaneDelcroix StephaneDelcroix added this to the Backlog milestone Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging proposal/open
Projects
None yet
Development

No branches or pull requests

2 participants