System.DateTime is a frustrating object for a number of reasons, many of
which I hope to elaborate in future posts.
Unfortunately, there is nothing like a
UtcDateTime class in the .NET BCL. You’re basically
stuck with the following:
There are only two signals to future programmers:
- the “Utc” suffix on your parameter name
You have absolutely no way to enforce at compile time that someone actually passed you the UTC time you need. Relying on exceptions and parameter names is confusing and error prone.