Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
539f239e
Commit
539f239e
authored
May 14, 2012
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#14766: Reflow the altered paragraphs.
parent
9075d8b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
Doc/library/datetime.rst
Doc/library/datetime.rst
+17
-18
No files found.
Doc/library/datetime.rst
View file @
539f239e
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
The :mod:`datetime` module supplies classes for manipulating dates and times in
The :mod:`datetime` module supplies classes for manipulating dates and times in
both simple and complex ways. While date and time arithmetic is supported, the
both simple and complex ways. While date and time arithmetic is supported, the
focus of the implementation is on efficient attribute extraction for output
focus of the implementation is on efficient attribute extraction for output
formatting and manipulation. For related
formatting and manipulation. For related
functionality, see also the
functionality, see also the
:mod:`time` and :mod:`calendar` modules.
:mod:`time` and :mod:`calendar` modules.
There are two kinds of date and time objects: "naive" and "aware".
There are two kinds of date and time objects: "naive" and "aware".
...
@@ -25,22 +25,21 @@ interpretation [#]_.
...
@@ -25,22 +25,21 @@ interpretation [#]_.
A naive object does not contain enough information to unambiguously locate
A naive object does not contain enough information to unambiguously locate
itself relative to other date/time objects. Whether a naive object represents
itself relative to other date/time objects. Whether a naive object represents
Coordinated Universal Time (UTC),
Coordinated Universal Time (UTC), local time, or time in some other timezone is
local time, or time in some other timezone is purely up to the program, just
purely up to the program, just like it is up to the program whether a
like it's up to the program whether a particular number represents metres,
particular number represents metres, miles, or mass. Naive objects are easy to
miles, or mass. Naive objects are easy to understand and to
understand and to work with, at the cost of ignoring some aspects of reality.
work with, at the cost of ignoring some aspects of reality.
For applications requiring aware objects, :class:`.datetime` and :class:`.time`
For applications requiring aware objects, :class:`.datetime` and :class:`.time` objects
objects have an optional time zone information attribute, :attr:`tzinfo`, that
have an optional time zone information attribute, :attr:`tzinfo`, that can be
can be set to an instance of a subclass of the abstract :class:`tzinfo` class.
set to an instance of a subclass of the abstract :class:`tzinfo` class. These
These :class:`tzinfo` objects capture information about the offset from UTC
:class:`tzinfo` objects capture information about the offset from UTC time, the
time, the time zone name, and whether Daylight Saving Time is in effect. Note
time zone name, and whether Daylight Saving Time is in effect. Note that only
that only one concrete :class:`tzinfo` class, the :class:`timezone` class, is
one concrete :class:`tzinfo` class, the :class:`timezone` class, is supplied by the
supplied by the :mod:`datetime` module. The :class:`timezone` class can
:mod:`datetime` module. The :class:`timezone` class can represent simple
represent simple timezones with fixed offset from UTC, such as UTC itself or
timezones with fixed offset from UTC such as UTC itself or North American EST and
North American EST and EDT timezones. Supporting timezones at deeper levels of
EDT timezones. Supporting timezones at deeper levels of detail is
detail is up to the application. The rules for time adjustment across the
up to the application. The rules for time adjustment across the
world are more political than rational, change frequently, and there is no
world are more political than rational, change frequently, and there is no
standard suitable for every application aside from UTC.
standard suitable for every application aside from UTC.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment