Essay - Published: 2020.11.30 | csharp | date | time |
DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)
Note to self: Default to using DateTimeOffset for dates rather than DateTime.
Is basically DateTime plus it has awareness of time zones.
DateTimeOffset is typically what I'll want to use. It does everything DateTime does plus has some additional data on time zones. This makes it easier to do date arithmetic after the fact if time zones need to be taken into account.
The best way to support my work is to like / comment / share for the algorithm and subscribe for future updates.