C#

C#

Made by DeepSource

Found the usage of DateTime.Now that relies on system-specific information CS-W1091

Bug risk
Critical

DateTime.Now refers to the date and time that is local and specific to the computer on which the program is running. Because you may either misinterpret this information or miss out on any additional information, it is recommended that you use DateTime.UtcNow. This ensures that your program, irrespective of which computer it runs on, utilizes information that is kept consistent.

Bad Practice

var now = DateTime.Now;

Recommended

var now = DateTime.UtcNow;