Martin v. Löwis <mar...@v.loewis.de> added the comment: > The difference is that UTC includes leap seconds, whereas UT1 does not (see > <http://en.wikipedia.org/wiki/Coordinated_Universal_Time>). The > conversion routines ignore leap seconds, e.g., > (time.mktime((2000,1,1,12,0,0,0,0,0))- > time.mktime((1990,1,1,12,0,0,0,0,0))) returns an exact multiple of > 24*60*60 and does not include all the leap seconds added between those > dates.
Read the documentation carefully. It doesn't claim that mktime uses UTC, and claiming that it uses UT1 would be equally incorrect. Instead, mktime uses local time (as documented). Whether that includes leap seconds or not depends on the definition of your time zone in your operating system. Also notice that the Unix time (time_t) is discontinuous with respect to leap seconds; each day time_t advances by 86400 seconds even if there was a leap second on that day; see http://en.wikipedia.org/wiki/Unix_time So even if your time zone includes leap seconds, then mktime still correctly computes the difference as multiple of 86400. Which specific other usage of UTC do you also consider incorrect? ---------- nosy: +loewis _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4775> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com