Say a contract has a condition based on NOW
being after a time. Is NOW
UTC, and is this validated by each node before being added to the chain? Let's say you want ensure a function is called during a 1 hour window, will this be possible to enforce?
For example:
current stack state: NOW - 15 minutes :: NOW + 45 minutes //pseudocode
code: NOW; SUB; GT; SWAP;
NOW; SWAP; SUB;
AND;
IF { send transaction... } { FAIL; };
This should check that it's greater than NOW - 15 minutes and less than NOW + 45 minutes, which are both true so it can execute the transaction.
It might also be important to understand how the network gets consensus on a block time across the network?