diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-12-31 16:01:47 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-12-31 16:01:47 (GMT) |
commit | 9532298c82d8384a6c469136ac87842990ec10dd (patch) | |
tree | 136d11c4964fd8d122d527e54a0aa1f8c903c1f2 /Doc/lib/libdatetime.tex | |
parent | 3f0b542f2559869715e25164e92e7255220a0ea3 (diff) | |
download | cpython-9532298c82d8384a6c469136ac87842990ec10dd.zip cpython-9532298c82d8384a6c469136ac87842990ec10dd.tar.gz cpython-9532298c82d8384a6c469136ac87842990ec10dd.tar.bz2 |
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).
Diffstat (limited to 'Doc/lib/libdatetime.tex')
-rw-r--r-- | Doc/lib/libdatetime.tex | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Doc/lib/libdatetime.tex b/Doc/lib/libdatetime.tex index 4327312..700926d 100644 --- a/Doc/lib/libdatetime.tex +++ b/Doc/lib/libdatetime.tex @@ -208,7 +208,7 @@ Supported operations: \begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes} \lineiii{\var{t1} = \var{t2} + \var{t3}} - {Sum of \var{t2} and \var{t3}. + {Sum of \var{t2} and \var{t3}. Afterwards \var{t1}-\var{t2} == \var{t3} and \var{t1}-\var{t3} == \var{t2} are true.} {(1)} @@ -231,13 +231,13 @@ Supported operations: \lineiii{-\var{t1}} {equivalent to \class{timedelta}(-\var{t1.days}, -\var{t1.seconds}, -\var{t1.microseconds}),and to \var{t1}* -1.} - {(1)(3)} + {(1)(3)} \lineiii{abs(\var{t})} {equivalent to +\var{t} when \code{t.days >= 0}, and to -\var{t} when \code{t.days < 0}.} {(1)} - + \end{tableiii} \noindent Notes: @@ -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 \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 - tz, representing the same UTC time as self. \code{self.astimezone(tz)} - is then equivalent to - \begin{verbatim} - (self - (self.utcoffset() - tz.utcoffset(self)).replace(tzinfo=tz) - \end{verbatim} - where the result of \code{tz.utcoffset(self)} is converted to a - \class{timedelta} if it's an integer. + tz, representing the same UTC time as self. + XXX [The treatment of endcases remains unclear: for DST-aware + classes, one hour per year has two spellings in local time, and + another hour has no spelling in local time.] XXX \end{methoddesc} \begin{methoddesc}{utcoffset}{} |