What is the use of a timestamp in a distributed system?

A timestamp in a distributed system is used to order events and transactions, to synchronize clocks between different nodes, and to detect and resolve conflicts and inconsistencies.