I want to sort transactions, within a specific tag, in temporal order. In the docs it says:

timestamp : Int timestamp of the transaction. It is important to know that timestamps in IOTA are not enforced.

Is there a convention regarding the time zones to be used? And what's about attachmentTimestamp? On which of the time-related fields, timestamp or attachmentTimestamp, should I relay?

up vote 3 down vote accepted

Timestamps in transactions are expected to be unix timestamp. Unix timestamps are timezone independent.

Most importantly, timestamps are set by the client (i.e. the sender) and nothing in the protocol guarantees that they are correct. So relying on timestamp/attachmentTimestamp to re-order the transactions is probably not the best option (unless you have a complete control of the client).

If you need ordered messages, you can look at Masked Authenticated Messaging (aka MAM) were in addition to strict message ordering you can also have (optionnaly) encryption of the data.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.