I'm facing a doubt while developing an Smart Contract. I was getting current date from block.timestamp several times inside a function. Could this value change during an Smart Contract execution? Or the Smart Contracts are executed in the same block, so block.timestamp, block.number... have always the same value, during the execution?
Obviously, if not, solution is simple. Getting block.timestamp in a variable value on init, and use the variable value during the execution.
uint foo = block.timestamp;