I am building a lotery with one game per day on Ethereum but I need to know what is time zone is the transaction date in Solidity.
Is it gmt+0?
I am building a lotery with one game per day on Ethereum but I need to know what is time zone is the transaction date in Solidity.
Is it gmt+0?
Yes, it is GMT+0 or UTC.
According to Ethereum Yellow Paper the timestamp in a block is a unix timestamp.
timestamp: A scalar value equal to the reasonable output of Unix’s time() at this block’s inception; formally Hs.
Now from wikipedia
Unix time (also known as POSIX time or UNIX Epoch time) is a system for describing a point in time, defined as an approximation of the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.
From Solidity docs
block.timestamp (uint): current block timestamp as seconds since unix epoch
It's a UNIX timestamp. Also now is an alias for block.timestamp.
A few things to keep in mind:
I need to know what is time zone is the transaction date in Solidity
You only get the block timestamp, not the transaction timestamp.
a lotery with one game per day
Miners (esp. mining pools) can potentially adjust the timestamp as they mine, so you should design your lottery in a way that it's not entirely timestamp dependent.