Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:

I was able to reproduce this issue on Linux as follows

>>> import time, calendar, os
>>> os.environ['TZ'] = 'right/UTC'  # "right" timezones account for leap seconds
>>> time.tzset()
>>> calendar.timegm(time.gmtime(1234567899))
1234567875

This confirms Martin's insight that on the OP's system gmtime accounts for leap 
seconds.

There has been a general trend in Python to replace calls to system dependent 
functions in the time module with system independent reimplementations.  It is 
certainly possible to reimplement time.gmtime, but someone should champion this 
idea on python-dev.

----------
assignee:  -> belopolsky
stage:  -> needs patch
type: behavior -> enhancement
versions: +Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33579>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to