Search code examples
.netsql-serverwindows-10utc

Why does Windows 10 display a different UTC time to .Net and SQL Server?


If I set up a clock in Windows 10 that displays UTC time:

enter image description here

It displays a date and time that is an hour different to the .Net DateTime.UtcNow() function and the SQL Server GETUTCDATE()

  • SQL Server select GETUTCDATE() returns 2015-09-22 20:52:01.913
  • .Net DateTime.UtcNow() is the same

Why is this? Which one is right? How do I get them the same?


Solution

  • As @BryceWagner points out, despite the fact that you named the bottom clock "UTC", it's actually set to UTC-11 hours.

    Change the dropdown to "(UTC) Coordinated Universal Time" (or the Windows 10 equivalent).