Sometimes concepts we took for granted are challenged. Did this happen to time recently?
Dealing with dates and time is always tricky, and in Solidity there is no difference. Although there are some keywords that help us like now and units like days or hours there are a few things we have to keep in mind. You should also keep in mind that the EVM counts time in seconds.
Everything is a Unix timestamp!
In general, there are two options to include a time factor into a Solidity contract: relating to the current block number or relating to the current timestamp. There are also two interesting points, much thanks Roman Sivakov & Banteg for spotting 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?
Second, with very small changes 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, by the way, there is a separate department that keeps an eye on the leap seconds issue!