A question about transaction broadcasting and block creation Let's say we have transaction X and transaction Y. The timestamp of X is chronologically earlier than that of Y. X's spender broadcasts X to the network and the same goes for Y's spender.

Let's say that miners receive Y first and they add it to the next block, which reaches the max number of stored transactions. Will X be included to the block after this one? Will it be discarded?

If X will be included to the block after this one, isn't it a problem that it happened before Y?

Thanks in advance for your answers!
If I undestend the your question, you referer to the lockTime inside the  transaction and not the block timestamp.
The lockTime is a int value, and this value rappresent &quot;When the transaction can be unlockd to an inputs&quot; and not &quot;When the transaction was published&quot;
Lock time: Defines the first instant in which the transaction is considered valid and can be transmitted on the Bitcoin network, represented by an integer value between 0 and 500 million, assuming different meanings based on the value assigned, that is:

Lock time = 0: the transaction is propagated and executed at the instant of
creation.
0 &lt; LockTime &lt;= 500: the value is interpreted as a block height, ie the
transaction will be valid only after the block with height
equal to the lock time value has been published.
Lock time&gt; 500 million: the value is interpreted as a unix timestamp and
therefore the transaction will be valid only after the
date represented by the lock time value.

If you mean if the transaction has a timestamp, the answer is two:

Within the structure the transaction does not have a timestamp, but
rather a lock time.

The transaction could have an insertion moment in the block, which
depends on the block, because it is he who holds the timestamp as a
value.


A real use case:
  My transaction has a block timestamp equal to 8/23/2019, 2:08:43 PM GMT + 2, this represents the time in which the miner started the cryptographic challenge, and it is the instant in which the miner has also taken into consideration my transaction including it in the block.
My transaction has a lockTime of 0 because it is an immediate execution transaction.
No one excuses that my transaction before the block was published was ALSO inside some other block with a slightly different timestamp
If you want have turned a detailed explanation of what and how a transaction works, I recommend this reading on bitcoin book
Update from Bitcoin Dev
In the comment, Pieter Wuille in the comment below post the following answer and explain that my answer is wrong, and a very precise answer is reported below

The nLockTime of a transaction determines the earliest possible time
it can be included in a block. It is illegal to have a block which
includes a transaction whose locktime has not passed yet. There are
however mechanisms to forcing a transaction output to be only be
spendable with a future transaction which has a certain locktime - the
net effect being that this output can be included on chain, but
transactions spending it cannot until such time passes.