Last Updated: May 22, 2026
Every order has a timestamp. Every discount has an expiry. Every flash sale starts at one moment and ends at another. The time package is what Go gives you to work with all of that: the clock, the calendar, durations, time zones, and the timers that drive scheduled work. It looks tame on the surface and has more sharp edges underneath than almost any other standard library package, so this chapter walks through the parts you'll use and the surprises that surface in production.