This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, docs@python, techtonik
Date 2010-05-27.18:09:06
SpamBayes Score 0.0051051034
Marked as misclassified No
Message-id <1274983749.17.0.480328978139.issue8822@psf.upfronthosting.co.za>
In-reply-to
Content
> 'naive' and 'aware' are key datetime types - they need a proper
> definition and anchor for crossrefences.

The definition is given in the introductory section:
"""
There are two kinds of date and time objects: “naive” and “aware”. This distinction refers to whether the object has any notion of time zone, daylight saving time, or other kind of algorithmic or political time adjustment. 
"""

I am not sure what you propose to add to this.  Do you wan't to dedicate a separate subsection to naive and aware time and datetime? I feel that would be an overkill.  Would simply adding index entries for naive and aware time/datetime objects be enough?

> It is not said how to make non-naive object, 

This may be due to the fact that there is no concrete tzinfo implementation in stdlib.  See issue 5094.

I think it can be added in datetime constructor section that providing a tzinfo argument results in an aware object.  this is already so for datetime.fromtimestamp.

> how to detect if object of naive or aware.

This is already clear IMO:

"""
An object d of type time or datetime may be naive or aware. d is aware if d.tzinfo is not None and d.tzinfo.utcoffset(d) does not return None. If d.tzinfo is None, or if d.tzinfo is not None but d.tzinfo.utcoffset(d) returns None, d is naive.
"""
History
Date User Action Args
2010-05-27 18:09:09belopolskysetrecipients: + belopolsky, techtonik, docs@python
2010-05-27 18:09:09belopolskysetmessageid: <1274983749.17.0.480328978139.issue8822@psf.upfronthosting.co.za>
2010-05-27 18:09:07belopolskylinkissue8822 messages
2010-05-27 18:09:07belopolskycreate