Removed the now-untrue (or soon-to-be untrue) part of the astimezone()

docs.  Replaced it with an XXX block, because the hoped-for treatment
of DST endcases remains unclear (Guido doesn't really like raising an
exception when it's impossible to deliver a correct result, but so
far I have no way in hand to consistently deliver a defined incorrect
result either).
This commit is contained in:
Tim Peters 2002-12-31 16:01:47 +00:00
parent 3f0b542f25
commit 9532298c82
1 changed files with 7 additions and 10 deletions

View File

@ -1258,13 +1258,10 @@ These are the same as the \class{datetime} methods of the same names.
without any conversion of date or time fields. If self is aware and without any conversion of date or time fields. If self is aware and
\code{tz.utcoffset(self)} does not return \code{None}, the date and \code{tz.utcoffset(self)} does not return \code{None}, the date and
time fields are adjusted so that the result is local time in timezone time fields are adjusted so that the result is local time in timezone
tz, representing the same UTC time as self. \code{self.astimezone(tz)} tz, representing the same UTC time as self.
is then equivalent to XXX [The treatment of endcases remains unclear: for DST-aware
\begin{verbatim} classes, one hour per year has two spellings in local time, and
(self - (self.utcoffset() - tz.utcoffset(self)).replace(tzinfo=tz) another hour has no spelling in local time.] XXX
\end{verbatim}
where the result of \code{tz.utcoffset(self)} is converted to a
\class{timedelta} if it's an integer.
\end{methoddesc} \end{methoddesc}
\begin{methoddesc}{utcoffset}{} \begin{methoddesc}{utcoffset}{}