Leap Smear
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
從 2008 年開始,我們就不再使用時鐘步驟將經過的秒 (我們的分層秒數) 套用至我們的伺服器,而是在各個躍點之前與之後各小時的額外時間「間隔」。飛躍圖適用所有 Google 服務,包括所有的 API。
我們的標準標準
許多機構都使用氣味時鐘,如果大氣同時是相同的,就會有幫助。畢竟,時鐘的目的在於在不同位置同時讀取。
我們建議任何會間隔一小段時間的使用者使用從中午到晚上 14 點 (UTC 到中午) 的線性煙霧。
本 綜合測試結合了多項功能在許多分散式運算應用程式中的成效良好:
- 時間長度越長,展示頻率就會越小。母親的改變
大約是 11.6ppm這是多數機器的製造和熱錯誤;石英振盪器,而且位在 NTP 最高 500 ppm 的最大回流速率下。
- 將斷層置中於閏秒 (而非讓開頭或結尾是閏秒),將最大偏移量降到最低。
- 相較於餘弦微粒,線性微光效果較簡單,計算方式也更加容易,並將最大頻率變化降到最低。
- 其他會抽大 24 小時的片長,如今受到其他監獄的偵測。
我們以前用了 20 小時的揮灑時間
我們計劃日後再使用這項塗鴉。Amazon 在 AWS 中使用了這首歌曲。將系統設定為使用 Google Public NTP 是在您的系統中使用的方法之一。
標準微粒示例
在本範例中,我們預計 2022 年 12 月底前會有閏秒,但實際上尚未公布。
測試期間自 2022-12-31 12:00:00 (UTC) 開始,一直持續至 2023-01-01 12:00:00 (UTC)。在這之前和之後,有點鐘和時間服務會同意套用閏秒的時鐘。
測試期間,時鐘的運行速度比平常慢一些。如同「堆疊時間」中所述,挖掘的時序每秒每秒比 SI 秒長約 11.6 微秒。
閏秒開始時,截止時間會少於世界標準時間 0.5 秒。UTC 會插入額外的秒數,氣味時間則不會中斷。這會導致即使在世界標準時間倒數第二端之前,時間會低於世界標準時間 0.5 秒。
持續以同樣緩慢的速度執行時鐘,進行中的斷層將在接下來的 12 小時內降低這項偏移。12:00:00 前
TAI 檔 |
無意義 UTC |
消化時間 |
2022-12-31 12:00:36.000000 |
2022-12-31 11:59:59.000000 |
2022-12-31 11:59:59.000000 |
2022-12-31 12:00:37.000000 |
2022-12-31 12:00:00.000000 |
2022-12-31 12:00:00.000000 |
2022-12-31 12:00:38.000011 |
2022-12-31 12:00:01.000011 |
2022-12-31 12:00:01.000000 |
2023-01-01 00:00:35.499976 |
2022-12-31 23:59:58.499976 |
2022-12-31 23:59:58.000000 |
2023-01-01 00:00:36.499988 |
2022-12-31 23:59:59.499988 |
2022-12-31 23:59:59.000000 |
2023-01-01 00:00:37.000000 |
2022-12-31 23:59:60.000000 |
2022-12-31 23:59:59.500005 |
2023-01-01 00:00:37.500000 |
2022-12-31 23:59:60.500000 |
2023-01-01 00:00:00.000000 |
2023-01-01 00:00:38.000000 |
2023-01-01 00:00:00.000000 |
2023-01-01 00:00:00.499994 |
2023-01-01 00:00:38.500011 |
2023-01-01 00:00:00.500011 |
2023-01-01 00:00:01.000000 |
2023-01-01 00:00:39.500023 |
2023-01-01 00:00:01.500023 |
2023-01-01 00:00:02.000000 |
2023-01-01 12:00:36.999988 |
2023-01-01 11:59:58.999988 |
2023-01-01 11:59:59.000000 |
2023-01-01 12:00:38.000000 |
2023-01-01 12:00:00.000000 |
2023-01-01 12:00:00.000000 |
2023-01-01 12:00:39.000000 |
2023-01-01 12:00:01.000000 |
2023-01-01 12:00:01.000000 |
在 86,401 次 SI 出現的 SI 秒數內,在 86,400 秒的秒數當中,延長為 1 秒。
如果從來不及時有負面的負步秒數,從中午到中午的 86,399 SI 時加倍
其他抽象
已提出或實作了數筆其他大屠殺,
軟體的支援功能
我們的開放原始碼未拆式程式庫會在兩次時間 (未回應的 TAI 或 GPST) 之間轉換。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2022-02-15 (世界標準時間)。
[null,null,["上次更新時間:2022-02-15 (世界標準時間)。"],[[["\u003cp\u003eGoogle uses a "leap smear" to handle leap seconds, gradually adjusting time over 24 hours instead of abrupt clock steps.\u003c/p\u003e\n"],["\u003cp\u003eGoogle's recommended leap smear standard is a 24-hour linear smear from noon to noon UTC for distributed computing applications.\u003c/p\u003e\n"],["\u003cp\u003eThe smear keeps frequency changes small, minimizes offset, and simplifies calculation, aligning with practices in AWS and Google Public NTP.\u003c/p\u003e\n"],["\u003cp\u003eSmeared time briefly deviates from UTC during the smear period but realigns after 24 hours.\u003c/p\u003e\n"],["\u003cp\u003eGoogle's open source "unsmear" library allows conversion between smeared and unsmeared time (TAI or GPST).\u003c/p\u003e\n"]]],["Google implements a \"leap smear\" for leap seconds, spreading the extra second over 24 hours, from noon to noon UTC. This linear smear, adopted by Amazon AWS, adjusts clocks to run slightly slower (about 11.6 ppm), ensuring minimal frequency change and offset. During the smear period, smeared time lags slightly behind UTC initially but aligns again at the end. Google advocates for this 24-hour linear smear as a standard and offers the \"unsmear library\" for time conversion.\n"],null,["# Leap Smear\n\nSince 2008, instead of applying leap seconds to our servers using clock steps,\nwe have \"smeared\" the extra second across the hours before and after each leap.\nThe leap smear applies to all Google services, including all our APIs.\n\nOur proposed standard smear\n---------------------------\n\nMany organizations use smeared clocks, and it would be helpful if the smears\nwere the same. After all, the purpose of clocks is to read the same time in\ndifferent places.\n\nWe encourage anyone smearing leap seconds to use a **24-hour linear smear from\nnoon to noon UTC**.\n\nThis smear combines the features that experience has shown to work well for many\ndistributed computing applications:\n\n- The long duration keeps the frequency change small. The change for the smear is about 11.6 ppm. This is within the manufacturing and thermal errors of most machines' quartz oscillators, and well under NTP's 500 ppm maximum slew rate.\n- Centering the smear on the leap second, instead of having it begin or end at the leap second, minimizes the maximum offset.\n- Compared to a cosine smear, the linear smear is simpler, easier to calculate, and minimizes the maximum frequency change.\n- The 24-hour duration has been widely adopted by others implementing smears. We previously used a 20-hour smear duration, but changed to align with this more popular noon-to-noon interval.\n\nWe plan to use this smear for all future leap seconds. Amazon\n[uses this smear](https://aws.amazon.com/blogs/aws/look-before-you-leap-the-coming-leap-second-and-aws/)\nin AWS. One way to use it in your systems is to configure them to use\n[Google Public NTP](/time/guides).\n\nExample of the standard smear\n-----------------------------\n\nIn this example, we will suppose there is a leap second at the end of December\n2022, although the actual schedule has not yet been announced.\n\nThe smear period starts at [2022-12-31 12:00:00\nUTC](https://www.timeanddate.com/worldclock/converter.html?iso=20211231T120000&p1=1440&p2=1241)\nand continues through [2023-01-01 12:00:00\nUTC](https://www.timeanddate.com/worldclock/converter.html?iso=20220101T120000&p1=1440&p2=1241).\nBefore and after this period, smeared clocks and time service agree with clocks\nthat apply leap seconds.\n\nDuring the smear, clocks run slightly slower than usual. Each second of time in\nthe smeared timescale is about 11.6 μs longer than an [SI\nsecond](http://www.bipm.org/en/publications/si-brochure/second.html) as realized\nin [Terrestrial Time](https://en.wikipedia.org/wiki/Terrestrial_Time).\n\nAt the beginning of the leap second, smeared time is just under 0.5 s\nbehind UTC. UTC inserts an additional second, while smeared time continues\nuninterrupted. This causes smeared time to become just under 0.5 s ahead\nof UTC when the leap second ends.\n\nBy continuing to run the clocks at the same slowed rate, the ongoing smear\nreduces this offset over the next twelve hours. By 12:00:00, smeared and leaping\nclocks agree again.\n\n| TAI | Unsmeared UTC | Smeared time |\n|----------------------------|----------------------------|----------------------------|\n| 2022-12-31 12:00:36.000000 | 2022-12-31 11:59:59.000000 | 2022-12-31 11:59:59.000000 |\n| 2022-12-31 12:00:37.000000 | 2022-12-31 12:00:00.000000 | 2022-12-31 12:00:00.000000 |\n| 2022-12-31 12:00:38.000011 | 2022-12-31 12:00:01.000011 | 2022-12-31 12:00:01.000000 |\n| 2023-01-01 00:00:35.499976 | 2022-12-31 23:59:58.499976 | 2022-12-31 23:59:58.000000 |\n| 2023-01-01 00:00:36.499988 | 2022-12-31 23:59:59.499988 | 2022-12-31 23:59:59.000000 |\n| 2023-01-01 00:00:37.000000 | 2022-12-31 23:59:60.000000 | 2022-12-31 23:59:59.500005 |\n| 2023-01-01 00:00:37.500000 | 2022-12-31 23:59:60.500000 | 2023-01-01 00:00:00.000000 |\n| 2023-01-01 00:00:38.000000 | 2023-01-01 00:00:00.000000 | 2023-01-01 00:00:00.499994 |\n| 2023-01-01 00:00:38.500011 | 2023-01-01 00:00:00.500011 | 2023-01-01 00:00:01.000000 |\n| 2023-01-01 00:00:39.500023 | 2023-01-01 00:00:01.500023 | 2023-01-01 00:00:02.000000 |\n| 2023-01-01 12:00:36.999988 | 2023-01-01 11:59:58.999988 | 2023-01-01 11:59:59.000000 |\n| 2023-01-01 12:00:38.000000 | 2023-01-01 12:00:00.000000 | 2023-01-01 12:00:00.000000 |\n| 2023-01-01 12:00:39.000000 | 2023-01-01 12:00:01.000000 | 2023-01-01 12:00:01.000000 |\n\nOver the 86,401 SI seconds of the smear, the stretch in the 86,400 indicated\nseconds adds up to the one additional SI second required by the leap.\n\nA negative leap second, if one were ever to occur, would be smeared by speeding\nup clocks over the 86,399 SI seconds from noon to noon.\n\nOther smears\n------------\n\nSeveral other smears have been proposed or implemented.\n\n- [UTC-SLS](https://www.cl.cam.ac.uk/%7Emgk25/time/utc-sls/) is a linear smear over 1,000 s before the leap (23:43:20 to 00:00:00).\n- [Google's 2008\n smear](https://googleblog.blogspot.com/2011/09/time-technology-and-leaping-seconds.html) was a 20-hour cosine smear before the leap (04:00:00 to 00:00:00). This was the only time we used a cosine smear.\n- [Google's second leap\n smear](https://cloudplatform.googleblog.com/2015/05/Got-a-second-A-leap-second-that-is-Be-ready-for-June-30th.html) was a 20-hour linear smear centered on the leap. We used this in 2012, 2015, and 2016.\n- [Bloomberg's\n smear](https://data.bloomberglp.com/professional/sites/4/Bloomberg-Leap-Second_December-2016.pdf) is a linear smear over 2,000 s after the leap (00:00:00 to 00:33:20).\n- [Meinberg](https://www.meinbergglobal.com/download/burnicki/Leap%20Second%20Smearing%20With%20NTP.pdf) has implemented a cosine smear of configurable duration.\n\nSoftware support for the smear\n------------------------------\n\nOur open source [unsmear library](https://github.com/google/unsmear) will\nconvert in either direction between smeared time and unsmeared TAI or GPST."]]