DateTime.Now
that relies on system-specific information CS-W1091DateTime.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.
var now = DateTime.Now;
var now = DateTime.UtcNow;