Currently, we have a standard way of dealing with .NET DateTime
\'s in a TimeZone aware way: Whenever we produce a DateTime
we do it in UTC (e.g. us
TLDR if you don't want to read all these great answers :-)
Explicit:
Using DateTimeOffset
because the timezone is forced to UTC+0.
Implicit:
Using DateTime
where you hope everyone sticks to the unwritten rule of the timezone always being UTC+0.
(Side note for devs: explicit is always better than implicit!)
(Side side note for Java devs, C# DateTimeOffset
== Java OffsetDateTime
, read this: https://www.baeldung.com/java-zoneddatetime-offsetdatetime)