homepage

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 vstinner
Recipients Neil Muller, amaury.forgeotdarc, andersjm, belopolsky, catlee, davidfraser, erik.stephens, guettli, hodgestar, jribbens, mark.dickinson, pitrou, r.david.murray, steve.roberts, tim.peters, tomster, vivanov, vstinner, werneck
Date 2010年12月17日.21:43:21
SpamBayes Score 4.2864947e-09
Marked as misclassified No
Message-id <1292622235.91.0.937616349668.issue2736@psf.upfronthosting.co.za>
In-reply-to
Content
It looks like it's not possible to choose between float and (int, int) output type for datetime.totimestamp(). One is more practical (and enough for people who doesn't need an exact result), and one is needed to keep the same resolution than the datetime object. I think that we can add two methods:
 * datetime.totimestamp()->float
 * datetime.totimestamptuple()->(int,int)
I choosed the shortest name for float because I suppose that most users prefer float than a tuple, and so the API is symmetrical:
 * datetime.fromtimestamp(float)->datetime
 * datetime.totimestamp()->float
My patch have to be updated to use the timezone (and the DST thing?) and also to update the Python implementation.
History
Date User Action Args
2010年12月17日 21:43:56vstinnersetrecipients: + vstinner, tim.peters, jribbens, guettli, amaury.forgeotdarc, mark.dickinson, davidfraser, belopolsky, pitrou, andersjm, catlee, tomster, werneck, hodgestar, Neil Muller, erik.stephens, steve.roberts, r.david.murray, vivanov
2010年12月17日 21:43:55vstinnersetmessageid: <1292622235.91.0.937616349668.issue2736@psf.upfronthosting.co.za>
2010年12月17日 21:43:21vstinnerlinkissue2736 messages
2010年12月17日 21:43:21vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /