On Mon, Jun 4, 2012 at 1:57 PM, Alexander Belopolsky <alexander.belopol...@gmail.com> wrote: > On Mon, Jun 4, 2012 at 3:05 PM, Guido van Rossum <gu...@python.org> wrote: >> You seem to have misread -- I don't want to check if they are exactly >> 24 hours apart. I want to check if they are at most 24 hours apart. >> The timezone can be assumed to be the same on dt1 and dt2. >> >> A variant of (1) was what was needed -- the user had just confused >> themselves into thinking they needed to convert to UTC first, and done >> a poor job of that. This is a common situation. > > It looks like if we had datetime.ticks() method, the user would simply > use it improperly and never ask his or her question. Hardly the > result that we want.
That's not my assessment of the situation. But I don't know what ticks() is supposed to do. I am assuming we would create totimestamp() and utctotimestamp() that mirror fromtimestamp() and utcfromtimestamp(). Since we trust the user with the latter we should trust them with the former. -- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com