Bitcoin
Get historical, accurate trading times (not mempool).

I’m trying to build a Python program that returns transaction details such as input, output, time, amount, etc. I already loaded bitcoind -txindex but when decoding the raw transaction the time field. I’ve already read that decoderawtransaction doesn’t include the transaction time, but I was wondering how btc Explorer gets that data.
The only time fields I’ve found are in the getblock command and getrawmempool/getmempoolentry (although they don’t focus on unconfirmed transactions). Can I get information from them?
Thank you for your time.