2

I try to find when is trustline to an asset is created in horizon database. I joining history_effects, history_accounts, history_operations and history_transactions. I got created_at field on history_transaction. But the value is different from it should be, I try to confirm through my Horizon REST API and it gave me different value from my query.

created_at  "2018-03-25T10:44:48Z" << from horizon rest api

2018-03-27 03:44:25.553025  << from query

Am I missing something here?

0

1 Answer 1

0

Look at the history_ledgers table. The field closed_at contains ledger closing timestamp. That filed shows when an operation was actually applied to the ledger. Use it instead of created_at from history_transactions.

And do not forget about timezones. Horizon shows dates in UTC, while PostgreSQL converts it to your local timezone.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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