Commit 30b418e3 authored by Tim Peters's avatar Tim Peters

astimezone(): document that None is an OK argument.

parent 384370c8
...@@ -603,8 +603,8 @@ Instance methods: ...@@ -603,8 +603,8 @@ Instance methods:
- astimezone(tz) - astimezone(tz)
Return a \class{datetimetz} with the same date and time fields, and Return a \class{datetimetz} with the same date and time fields, and
with \member{tzinfo} member \var{tz}. \var{tz} must be an instance with \member{tzinfo} member \var{tz}. \var{tz} must be \code{None},
of a \class{tzinfo} subclass. or an instance of a \class{tzinfo} subclass.
- timetuple() - timetuple()
Return a 9-element tuple of the form returned by Return a 9-element tuple of the form returned by
...@@ -1096,8 +1096,9 @@ Instance methods: ...@@ -1096,8 +1096,9 @@ Instance methods:
- astimezone(tz) - astimezone(tz)
Return a \class{datetimetz} with new tzinfo member \var{tz}. \var{tz} Return a \class{datetimetz} with new tzinfo member \var{tz}. \var{tz}
must be an instance of a \class{tzinfo} subclass. If self is naive, or must be \code{None}, or an instance of a \class{tzinfo} subclass. If
if \code(tz.utcoffset(self)} returns \code{None}, \var{tz} is \code{None}, self is naive, or
\code(tz.utcoffset(self)} returns \code{None},
\code{self.astimezone(tz)} is equivalent to \code{self.astimezone(tz)} is equivalent to
\code{self.replace(tzinfo=tz)}: a new timezone object is attached \code{self.replace(tzinfo=tz)}: a new timezone object is attached
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment