AiTeky Original Interactive Learning & Practice Intermediate
C# and .NET dates: store UTC, daylight saving and the job that ran twice
See why the same moment is a different date in different time zones, how daylight saving makes a local time vanish or happen twice, and fix a nightly job that ran twice on one day and not at all on another.
Dates look simple until the clock changes. A moment in time has one UTC value but a different local time in each time zone, and in zones that use daylight saving, a local time can be skipped in spring and repeated in autumn. Code that stores or schedules by local time then misbehaves exactly twice a year, usually at 3 a.m. when nobody is watching.
This course models dates and clock changes with small Python programs you can run in your browser. Python's datetime stands in for .NET's DateTime and DateTimeOffset: the code is not C#, but the rules it shows are the same. Check the .NET documentation for DateTimeOffset, TimeZoneInfo and DateTimeKind. The time zone and its change dates are made up.
- Learn lessons explain one idea at a time and let you run it.
- Industry ready lessons decide and justify, and end with interview questions.
No C# experience is assumed. Basic Python helps.
- ▶ Run code in your browser. Nothing to install
- ✓ Exercises that check themselves
- 📖 Tap a word to see what it means
Locked. Sign up free
Learn
Understand each idea with everyday examples. No coding background needed.
- 01 25 min Free sample 🔒 AiTeky Pass One moment, many dates Show how one instant falls on different calendar dates in different zones, and why you should store UTC and convert only for display.
- 02 25 min 🔒 AiTeky Pass The hour that vanishes and repeats Walk across a spring and an autumn clock change in a made-up zone and see a local time that does not exist on one day and happens twice on another.
Industry ready
Real problems from real jobs, and the questions interviewers ask about them.

