Working with date and time data in .NET
summary
Explains when to use Instant/Duration/Interval versus LocalDate/LocalTime/ZonedDateTime, why DateTimeKind and DateTimeOffset mislead, and why use Noda Time types for clear intent; demos include DateOnly/TimeOnly, mapping instants through time zones, and handling ambiguous or skipped local times during DST. Shows testing pattern: inject an IClock (or fake clock) to avoid time-dependent flakiness and cautions about calendar differences and database column semantics when persisting timestamps.
AI-written summary · about
chapters (18)
- 0:00Date/time challenges in .NET
- 3:18Why date/time handling is complex
- 8:24Approaching date/time work
- 8:45Machine vs civil time
- 10:28Problems with DateTime
- 14:03Why Noda Time was created
- 18:21Machine time types
- 21:57When to use machine time types
- 22:17Calendar systems complexities
- 24:43Dates/times in different calendars
- 25:48TimeOnly vs DateOnly in .NET 6
- 27:10Combining dates and times
- 27:31Time zones pitfalls
- 31:29ZonedDateTime limitations
- 33:15Periods and arithmetic challenges
- 33:58Key tips for date/time handling
- 36:25Testing with IClock
- 38:14Summary and call to action








