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.28649e-09
Marked as misclassified No
Message-id <>
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.
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: <>
2010-12-17 21:43:21vstinnerlinkissue2736 messages
2010-12-17 21:43:21vstinnercreate