I have a project that utilizes a web server as a GUI. I've added an expiration feature, essentially creating a desktop-like application that runs on a web server and is accessed through a browser. However, I'm experiencing issues with datetime.utcnow. Users can rollback the expiration by changing their system time. This method only calculates the local time and converts it to UTC. Is there a built-in class that can retrieve time from Microsoft? Windows has this feature and it can fix incorrect time zone issues by connecting to a Microsoft server.
Console.WriteLine(DateTime.UtcNow);