Message133245
| 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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年04月07日 18:32:02 | belopolsky | set | recipients:
+ 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:56 | belopolsky | link | issue2736 messages |
| 2011年04月07日 18:31:56 | belopolsky | create |
|