You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This idea was brought in the original fixed offset timezone proposal (see bpo-5094), but was met with some opposition. See msg106914, point 2. As a result, the timezone implementation is in conflict with tzinfo documentation that says "If utcoffset() does not return None, dst() should not return None either." http://docs.python.org/dev/py3k/library/datetime.html#datetime.tzinfo.utcoffset
Note that dst() is not needed for time calculations involving fixed offset timezones because DST shift is included in utcoffset(). It is however needed for interoperability with timetuple time representation. See bpo-9004.
If the long term goal is to move users from using timetuples to to datetime objects, it is important for time objects to be able to store DST flag.
After thinking some more about this issue, I am going to withdraw this proposal. If we want to support storing dst flag in datetime instances, it should be stored in the datetime object itself, not in tzinfo.
Activity
abalkin commentedon Jun 16, 2010
This idea was brought in the original fixed offset timezone proposal (see bpo-5094), but was met with some opposition. See msg106914, point 2. As a result, the timezone implementation is in conflict with tzinfo documentation that says "If utcoffset() does not return None, dst() should not return None either." http://docs.python.org/dev/py3k/library/datetime.html#datetime.tzinfo.utcoffset
Note that dst() is not needed for time calculations involving fixed offset timezones because DST shift is included in utcoffset(). It is however needed for interoperability with timetuple time representation. See bpo-9004.
If the long term goal is to move users from using timetuples to to datetime objects, it is important for time objects to be able to store DST flag.
abalkin commentedon Oct 14, 2010
After thinking some more about this issue, I am going to withdraw this proposal. If we want to support storing dst flag in datetime instances, it should be stored in the datetime object itself, not in tzinfo.
See
http://mail.python.org/pipermail/python-dev/2010-August/102842.html