DateTime.UtcNow tells you the date and time as it would be in Coordinated Universal Time, aka Greenwich Mean Time time zone. Basically the time as if you are in London England. DateTime.Now gives the date and time as it would appear to someone in your current locale.

It is better to store DateTime.UtcNow then DateTime.Now in the database. If your user is global wide, then you will have to know the local time zone of the user and convert the UTC time stored in the database to the local time.

Note: Azure always give you DateTime in UTC regardless of whether you use DateTime.UtcNow or DateTime.Now.

Last modified: February 27, 2019



Write a Reply or Comment