1. 23 Jan, 2003 2 commits
    • Tim Peters's avatar
    • Tim Peters's avatar
      Bringing the code and test suite into line with doc and NEWS changes · 97a00dd9
      Tim Peters authored
      checked in two days agao:
      
      Refactoring of, and new rules for, dt.astimezone(tz).
      
      dt must be aware now, and tz.utcoffset() and tz.dst() must not return None.
      The old dt.astimezone(None) no longer works to change an aware datetime
      into a naive datetime; use dt.replace(tzinfo=None) instead.
      
      The tzinfo base class now supplies a new fromutc(self, dt) method, and
      datetime.astimezone(tz) invokes tz.fromutc().  The default implementation
      of fromutc() reproduces the same results as the old astimezone()
      implementation, but tzinfo subclasses can override fromutc() if the
      default implementation isn't strong enough to get the correct results
      in all cases (for example, this may be necessary if a tzinfo subclass
      models a time zone whose "standard offset" (wrt UTC) changed in some
      year(s), or in some variations of double-daylight time -- the creativity
      of time zone politics can't be captured in a single default implementation).
      97a00dd9
  2. 22 Jan, 2003 10 commits
  3. 21 Jan, 2003 20 commits
  4. 20 Jan, 2003 7 commits
  5. 19 Jan, 2003 1 commit