Note that we are focused on Raft algorithm.
What's the data format of term?
A term is just a positive integer.
Is it composed of Unix timestamp and length?
No, it is not. A term is just a positive integer. It is that pure and simple. In practice for reasons such as reporting or auditing, it might be helpful to record the time period when each term is valid. However, that is not an essential part of the algorithm at all.
How does every node guarantee their timestamp are synchronous? (Google Spanner use Atomic clock to guarantee true time).
Presumably, the question is seeking to confirm that terms can be maintained properly if term is based on time. However, as said above, this term can be considered as having nothing to do with time. So the best answer to this question should be that there is no need to be concerned with that kind of guarantee.
Here is a figure that shows how term is used in the logs in Raft algorithm. The figure is taken from the award-winning paper In Search of an Understandable
Consensus Algorithm by the creators of Raft algorithm. Those numbers 1,1,1,2,3,3,3,3, etc in each log entry are the terms. Note that actual time is not mentioned anywhere in that figure, although a term does correspond to a limited continuous period of time.