Issue40017
Created on 2020-03-19 19:14 by r3owen, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 19096 | merged | r3owen, 2020-03-21 00:36 | |
| Messages (3) | |||
|---|---|---|---|
| msg364633 - (view) | Author: Russell Owen (r3owen) * | Date: 2020-03-19 19:14 | |
It is becoming common (at least in astronomy) to want to use TAI as a time standard because it is a uniform time with no leap seconds, and differs from UTC (standard computer clock time) by an integer number of seconds that occasionally changes. Linux offers a clock for TAI time: CLOCK_TAI. It would be very helpful to have this constant in the time module, e.g. for calling time.clock_gettime Caveat: linux CLOCK_TAI will return UTC time if the leap second table has not been set up. Both ntp and ptp can be configured to maintain this table. So this is a caveat worth mentioning in the docs. But I hope it is not sufficient reason to deny the request. |
|||
| msg364637 - (view) | Author: Benjamin Peterson (benjamin.peterson) * | Date: 2020-03-19 20:37 | |
I think we could certainly take a patch to expose that constant if libc/kernel headers expose it. |
|||
| msg364915 - (view) | Author: Benjamin Peterson (benjamin.peterson) * | Date: 2020-03-24 03:41 | |
New changeset 6000087fe979705dc588a46a35da884cc0198c67 by Russell Owen in branch 'master': closes bpo-40017: Add CLOCK_TAI constant to the time module. (GH-19096) https://github.com/python/cpython/commit/6000087fe979705dc588a46a35da884cc0198c67 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:28 | admin | set | github: 84198 |
| 2020-03-24 03:41:46 | benjamin.peterson | set | status: open -> closed resolution: fixed messages: + msg364915 stage: patch review -> resolved |
| 2020-03-21 00:36:25 | r3owen | set | keywords:
+ patch stage: patch review pull_requests: + pull_request18455 |
| 2020-03-19 20:43:09 | vstinner | set | nosy:
+ vstinner |
| 2020-03-19 20:37:23 | benjamin.peterson | set | nosy:
+ benjamin.peterson messages: + msg364637 |
| 2020-03-19 19:14:59 | r3owen | create | |