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 Jay.Taylor, Neil Muller, amaury.forgeotdarc, andersjm, belopolsky, catlee, davidfraser, erik.stephens, guettli, hodgestar, jribbens, lemburg, mark.dickinson, ping, pitrou, r.david.murray, steve.roberts, tim.peters, tomster, vivanov, vstinner, werneck
Date 2011-04-07.18:31:56
SpamBayes Score 0.0002504401
Marked as misclassified No
Message-id <BANLkTinDgP0f2ZozvEj2nzkOsoyUmtBH+Q@mail.gmail.com>
In-reply-to <4D9D8FFA.2040800@ivanov-nest.com>
Content
On Thu, Apr 7, 2011 at 6:20 AM, Velko Ivanov <report@bugs.python.org> wrote:
..
>> Converting datetime values to float is easy.   If your dt is a naive instance representing UTC time:
>>
>>     timestamp = (dt - datetime(1970, 1, 1)) / timedelta(seconds=1)
>>
>> If your dt is an aware instance:
>>
>>     timestamp = (dt - datetime(1970, 1, 1, tzinfo=timezone.utc)) / timedelta(seconds=1)
>
> Please add these lines to the datetime module's documentation. In some
> central, well lit place. I believe that if nothing else, the whole
> discussion should have proved to you that there are many people looking
> for them.

This is precisely what I suggested at the end of msg132697 above.  See
attached patch (issue2736-doc.diff) for a proposed documentation
enhancement.
Files
File name Uploaded
issue2736-doc.diff belopolsky, 2011-04-07.18:31:56
History
Date User Action Args
2011-04-07 18:32:02belopolskysetrecipients: + belopolsky, lemburg, tim.peters, ping, jribbens, guettli, amaury.forgeotdarc, mark.dickinson, davidfraser, pitrou, andersjm, catlee, vstinner, tomster, werneck, hodgestar, Neil Muller, erik.stephens, steve.roberts, r.david.murray, vivanov, Jay.Taylor
2011-04-07 18:31:56belopolskylinkissue2736 messages
2011-04-07 18:31:56belopolskycreate