Assign a UTC timestamp to a historical Solana block
A ledger export often needs both a slot and a human-readable time. Solana provides an estimated production timestamp in seconds for an available block.
Query a slot with a known block
Replace 250000 with a retained block slot from your export. Preserve the integer returned by the RPC before converting it to a display string. Keep time zone information explicit when writing the formatted value.
{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlockTime",
"params": [
250000
]
}
Check units before loading the warehouse
As a fixture, 1700000000 seconds corresponds to 2023-11-14 22:13:20 UTC. JavaScript Date accepts milliseconds, so multiply that input by 1000 before formatting. Using the seconds unchanged yields a date close to 1970. Record an unavailable time as unknown.
The estimate uses validator vote timestamps. Keep block identity and sequence keyed by slot, since several slots can share a timestamp. If an incident requires local arrival latency, measure receipt time at ingestion in a separate field.