1212 The :mod: `datetime ` module supplies classes for manipulating dates and times in
1313both simple and complex ways. While date and time arithmetic is supported, the
1414focus of the implementation is on efficient attribute extraction for output
15- formatting and manipulation. For related
16- functionality, see also the :mod: `time ` and :mod: `calendar ` modules.
15+ formatting and manipulation. For related functionality, see also the
16+ :mod: `time ` and :mod: `calendar ` modules.
1717
1818There are two kinds of date and time objects: "naive" and "aware".
1919
@@ -25,22 +25,21 @@ interpretation [#]_.
2525
2626A naive object does not contain enough information to unambiguously locate
2727itself relative to other date/time objects. Whether a naive object represents
28- Coordinated Universal Time (UTC),
29- local time, or time in some other timezone is purely up to the program, just
30- like it's up to the program whether a particular number represents metres,
31- miles, or mass. Naive objects are easy to understand and to
32- work with, at the cost of ignoring some aspects of reality.
33-
34- For applications requiring aware objects, :class: `.datetime ` and :class: `.time ` objects
35- have an optional time zone information attribute, :attr: `tzinfo `, that can be
36- set to an instance of a subclass of the abstract :class: `tzinfo ` class. These
37- :class: `tzinfo ` objects capture information about the offset from UTC time, the
38- time zone name, and whether Daylight Saving Time is in effect. Note that only
39- one concrete :class: `tzinfo ` class, the :class: `timezone ` class, is supplied by the
40- :mod: `datetime ` module. The :class: `timezone ` class can represent simple
41- timezones with fixed offset from UTC such as UTC itself or North American EST and
42- EDT timezones. Supporting timezones at deeper levels of detail is
43- up to the application. The rules for time adjustment across the
28+ Coordinated Universal Time (UTC), local time, or time in some other timezone is
29+ purely up to the program, just like it is up to the program whether a
30+ particular number represents metres, miles, or mass. Naive objects are easy to
31+ understand and to work with, at the cost of ignoring some aspects of reality.
32+
33+ For applications requiring aware objects, :class: `.datetime ` and :class: `.time `
34+ objects have an optional time zone information attribute, :attr: `tzinfo `, that
35+ can be set to an instance of a subclass of the abstract :class: `tzinfo ` class.
36+ These :class: `tzinfo ` objects capture information about the offset from UTC
37+ time, the time zone name, and whether Daylight Saving Time is in effect. Note
38+ that only one concrete :class: `tzinfo ` class, the :class: `timezone ` class, is
39+ supplied by the :mod: `datetime ` module. The :class: `timezone ` class can
40+ represent simple timezones with fixed offset from UTC, such as UTC itself or
41+ North American EST and EDT timezones. Supporting timezones at deeper levels of
42+ detail is up to the application. The rules for time adjustment across the
4443world are more political than rational, change frequently, and there is no
4544standard suitable for every application aside from UTC.
4645
0 commit comments