Fix typos.
This commit is contained in:
parent
27cfb6131a
commit
924049ca71
16
pep-0431.txt
16
pep-0431.txt
|
@ -48,7 +48,7 @@ For those who have an operating system that does not include the tz database,
|
|||
for example Windows, a distribution containing the latest tz database should
|
||||
also be available at the Python Package Index, so it can be easily installed
|
||||
with the Python packaging tools such as ``easy_install`` or ``pip``. This
|
||||
could also be done on Unices that are no longer recieving updates and
|
||||
could also be done on Unices that are no longer receiving updates and
|
||||
therefore has an outdated database.
|
||||
|
||||
With such a mechanism Python would have full time zone support in the
|
||||
|
@ -66,7 +66,7 @@ Getting the local time zone
|
|||
On Unix there is no standard way of finding the name of the time zone that is
|
||||
being used. All the information that is available is the time zone
|
||||
abbreviations, such as ``EST`` and ``PDT``, but many of those abbreviations
|
||||
are ambigious and therefore you can't rely on them to figure out which time
|
||||
are ambiguous and therefore you can't rely on them to figure out which time
|
||||
zone you are located in.
|
||||
|
||||
There is however a standard for finding the compiled time zone information
|
||||
|
@ -84,7 +84,7 @@ Ambiguous times
|
|||
|
||||
When changing over from daylight savings time the clock is turned back one
|
||||
hour. This means that the times during that hour happens twice, once without
|
||||
DST and then once with DST. Similarily, when changing to daylight savings
|
||||
DST and then once with DST. Similarly, when changing to daylight savings
|
||||
time, one hour goes missing.
|
||||
|
||||
The current time zone API can not differentiating between the two ambiguous
|
||||
|
@ -129,7 +129,7 @@ function and one new exception.
|
|||
* New function :``get_timezone(name=None, db=None)``
|
||||
|
||||
This function takes a name string that must be a string specifying a
|
||||
valid zoneinfo timezone, ie "US/Eastern", "Europe/Warsaw" or "Etc/GMT+11".
|
||||
valid zoneinfo timezone, i.e. "US/Eastern", "Europe/Warsaw" or "Etc/GMT+11".
|
||||
If not given, the local timezone will be looked up. If an invalid zone name
|
||||
are given, or the local timezone can not be retrieved, the function raises
|
||||
`UnknownTimeZoneError`.
|
||||
|
@ -169,11 +169,11 @@ handle time ambiguity during DST changeovers.
|
|||
The ``is_dst`` parameter can be ``True`` (default), ``False``, or ``None``.
|
||||
|
||||
``True`` will specify that the given datetime should be interpreted as
|
||||
happening during daylight savings time, ie that the time specified is before
|
||||
happening during daylight savings time, i.e. that the time specified is before
|
||||
the change from DST.
|
||||
|
||||
``False`` will specify that the given datetime should be interpreted as not
|
||||
happening during daylight savings time, ie that the time specified is after
|
||||
happening during daylight savings time, i.e. that the time specified is after
|
||||
the change from DST.
|
||||
|
||||
``None`` will raise an ``AmbiguousTimeError`` exception if the time specified
|
||||
|
@ -185,7 +185,7 @@ There are also two new exceptions:
|
|||
* ``AmbiguousTimeError``
|
||||
|
||||
This exception is raised when giving a datetime specification that are
|
||||
ambigious while setting ``is_dst`` to None::
|
||||
ambiguous while setting ``is_dst`` to None::
|
||||
|
||||
>>> datetime(2012, 11, 28, 2, 0, tzinfo=timezone('Europe/Stockholm'), is_dst=None)
|
||||
>>>
|
||||
|
@ -197,7 +197,7 @@ There are also two new exceptions:
|
|||
* ``NonExistentTimeError``
|
||||
|
||||
This exception is raised when giving a datetime specification that are
|
||||
ambigious while setting ``is_dst`` to None::
|
||||
ambiguous while setting ``is_dst`` to None::
|
||||
|
||||
>>> datetime(2012, 3, 25, 2, 0, tzinfo=timezone('Europe/Stockholm'), is_dst=None)
|
||||
>>>
|
||||
|
|
Loading…
Reference in New Issue