Anthony Anthony - 4 years ago 234
C# Question

What is the difference between DateTime.UtcNow and DateTime.Now.ToUniversalTime()

To me they're both the same. Is UtcNow simply a shortcut?

Answer Source

Actually it's the other way around. The Now property is implemented as:

public static DateTime Now {
  get {
    return UtcNow.ToLocalTime();
  }
}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download