Loading topic
date, time, and datetime from the standard datetime module. You will learn how to build them, read their parts, change them, compare them, and avoid the errors 6 min readtimedelta is a length of time, such as "3 days" or "90 minutes". It is not a point on the calendar. You get one when you subtract two dates or datetimes, and you use one to move a date or datetime forward or backward. This chapter covers how timedelta stores its value, which operators accept i4 min readdatetime objects and use timedelta, and that you know what UTC and a UTC offset are. It covers how datetime decides whether a value is tied to a real moment, which operations break when you mix the two kinds, and how to move between them safely.7 min readdatetime and timezone types from earlier chapters, and the difference between naive and aware datetimes. You should also know that UTC is the reference time that has no daylight saving. Here you will learn how to read the clock correctly, how POSIX timestamps re6 min readdate, datetime, and timedelta types, the difference between naive and aware datetimes, and how to attach a ZoneInfo zone. Here you will turn text into datetimes (parsing) and datetimes into text (formatting). Both directions are common sources of bugs, becau6 min readtimezone.utc from the earlier chapters. It also assumes Python 3.9 or later, where the zoneinfo module is in the standard library.6 min readZoneInfo, as covered in the previous chapter. It also assumes you know that an aware datetime carries a UTC offset. Here you will learn how astimezone moves a moment between zones. You will also see how it differs from replace, and what 6 min readZoneInfo and convert them with astimezone. It covers what happens when a local clock time does not exist, or exists twice, and how the fold attribute lets you say which occurrence you mean.6 min readdatetime, timedelta and ZoneInfo basics from the earlier chapters. You should also know what naive and aware datetimes are, and how astimezone and fold work. It focuses on one question: what does "one day later" mean when the clocks change in between?5 min readZoneInfo to attach a zone to a datetime and convert it with astimezone, and that you know what an exception is. You should also know that Python 3.9 or later is required for zoneinfo. Here you will learn where the rules behind ZoneInfo("America/New_York") are7 min readdatetime, timedelta, and ZoneInfo basics, the difference between naive and aware datetimes, and how fold marks repeated local times. It also assumes Python 3.9 or later. A few details di7 min read