Questions tagged [time]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
23 views

Time-dependent tests with Buidler?

For Ganache, there are several solutions. What about Buidler? They implemented their own local blockchain, buidlerevm, which is different to Ganache.
1
vote
1answer
24 views

Why does Solidity not use the years keyword?

Solidity has keywords like seconds, minutes, hours, days and weeks that are used to specify units of time. Why do they not have years?
2
votes
1answer
59 views

Can the block number be set back in ganache?

I know about tools like ganache-time-traveler that let you advance the block number. But is it possible to go back to a lower value?
0
votes
1answer
36 views

What are some practical considerations for leap seconds?

From the solidity docs on time units: Take care if you perform calendar calculations using these units, because not every year equals 365 days and not even every day has 24 hours because of leap ...
0
votes
1answer
59 views

How do I add 7 years to a current time expressed as a block.timestamp?

Being new to solidity, I find the docs on the Internet very confusing. I simply want to add 7 years to a uint timeInSevenYearsFromNow = (block.timestamp).add(????); What is the value of ???? and ...
0
votes
1answer
84 views

Is there any library to estimate timestamp of future block?

I am in need of a library that estimates a date or some sort of timestamp when fed with a future block number (on mainnet or any major testnet). For instance, https://etherscan.io/block/countdown/...
2
votes
1answer
146 views

In truffle5, how to manipulate time with evm_increaseTime?

I am using truffle 5 and ganache-cli. I've imported increaseTime as import increaseTime from './helper/increaseTime'; and the increaseTime.js file is like this export default function increaseTime(...