# Leap Seconds & Time in Solidity

By [Officer's Blog](https://paragraph.com/@officercia) · 2025-07-31

---

Sometimes [concepts](https://ethereum.stackexchange.com/questions/76015/what-are-some-practical-considerations-for-leap-seconds) we took for granted are [challenged](https://medium.com/solidified/the-times-are-a-changing-a300ff960df). Did this happen to time recently?

[

Should We Abandon the Leap Second?
----------------------------------

We have been adding "leap seconds" to time kept by our atomic clocks, but soon we may have to subtract one. Are the tiny adjustments worth the bother?

https://www.scientificamerican.com

![](https://storage.googleapis.com/papyrus_images/7414527093e3cf0f128fa8176a322af6e8a44963d37ecf8b6891ac195f1f126b.webp)

](https://www.scientificamerican.com/article/leap-seconds-may-be-abandoned-by-the-worlds-timekeepers/)

[Dealing](https://medium.com/solidified/the-times-are-a-changing-a300ff960df) with dates and time is always tricky, and in Solidity there is no difference. [Although](https://medium.com/solidified/the-times-are-a-changing-a300ff960df) there are some keywords that help us like now and units like days or hours there are a few [things](https://github.com/yearn/yearn-vaults/pull/215) we have to keep in mind. You should [also](https://betterprogramming.pub/solidity-tutorial-all-about-time-units-b392324bea32) keep in [mind](https://blog.finxter.com/ether-and-time-units-and-globally-available-variables-in-solidity/) that the EVM counts time in seconds.

> Everything is a Unix [timestamp](https://betterprogramming.pub/solidity-tutorial-all-about-time-units-b392324bea32?source=post_page-----9f806dcda79a--------------------------------)!

In general, there are two [options](https://ethereum.stackexchange.com/questions/68064/what-is-the-time-zone-of-the-ethereum-block-chain) to include a time factor into a Solidity contract: relating to the [current](https://betterprogramming.pub/solidity-tutorial-all-about-time-units-b392324bea32) block number or [relating](https://mixbytes.io/blog/metamorphic-smart-contracts-is-evm-code-truly-immutable) to the current timestamp. There are also two [interesting](https://mixbytes.io/blog/metamorphic-smart-contracts-is-evm-code-truly-immutable) points, much thanks [Roman Sivakov](https://rsivakov.com/) & [Banteg](https://medium.com/@banteg) for [spotting](https://medium.com/@BokkyPooBah/bokkypoobahs-gas-efficient-solidity-datetime-library-92bf96d9b2da) and bringing them up in a dev-chat:

*   First, did you know that the future behavior of the Earth’s rotation is unknown, so the UT1-UTC difference is unpredictable and can only be derived from [observations](https://medium.com/@BokkyPooBah/bokkypoobahs-gas-efficient-solidity-datetime-library-92bf96d9b2da)?
    
*   Second, with very small [changes](https://www.scientificamerican.com/article/leap-seconds-may-be-abandoned-by-the-worlds-timekeepers/) in the angular velocity of the Earth’s rotation, leap seconds can run up quite quickly, because a small change in angular velocity is multiplied by time, i.e., there is a cumulative effect. In [Paris](https://hpiers.obspm.fr/eop-pc/), by the way, there is a separate [department](https://hpiers.obspm.fr/eop-pc/) that keeps an eye on the leap [seconds](https://www.geeksforgeeks.org/time-units-in-solidity/?source=post_page-----9f806dcda79a--------------------------------) issue!
    

Stay safe!
----------

---

*Originally published on [Officer's Blog](https://paragraph.com/@officercia/leap-seconds-time-in-solidity)*
