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 loewis
Recipients georg.brandl, loewis, luckmor
Date 2008-12-30.08:46:59
SpamBayes Score 5.950474e-08
Marked as misclassified No
Message-id <4959E001.1080808@v.loewis.de>
In-reply-to <1230603442.34.0.985593856271.issue4775@psf.upfronthosting.co.za>
Content
> 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?
History
Date User Action Args
2008-12-30 08:47:03loewissetrecipients: + loewis, georg.brandl, luckmor
2008-12-30 08:47:02loewislinkissue4775 messages
2008-12-30 08:47:00loewiscreate