My project is fully based on time. Is there any way to get current time without using NOW? NOW is just returns time when block was mined and always shows "transaction will fail" when I do require(now > 1517735968)
, but if I ignore it, everything works fine.
[Ethereum] How to get current time
block-intervalsoliditytimestamp
Best Answer
You can use Oraclize service.
What you need:
By making simple custom query in my browser:
I was able to get result:
Short Answers API
I realised when I posted this answer that there is a shorter way to make your query from contract. Below you can see
workingexample which you can test in browser-solidity. Just click create button and after couple of times clicking on timestamp it should show:string: 1517738717
(timestamp at a time I was writing it).