native_datetime_utc_fromtimestamp

Documentation for eth_defi.compat.native_datetime_utc_fromtimestamp function.

native_datetime_utc_fromtimestamp(timestamp)

Convert timestamp to native UTC datetime object.

Replacement for the deprecated datetime.datetime.utcfromtimestamp(). Returns a native datetime object (no timezone info) representing UTC time.

This is optimized for blockchain contexts where: - All timestamps are assumed to be UTC - Timezone-aware objects add unnecessary overhead - native datetimes are sufficient and faster

Args:

timestamp (float): Unix timestamp (seconds since epoch)

Returns:

datetime.datetime: native datetime object in UTC

Parameters

timestamp (float) –

Return type

datetime.datetime