timestamps_to_filename

Function timestamps_to_filename 

Source
pub fn timestamps_to_filename(
    timestamp_1: UnixNanos,
    timestamp_2: UnixNanos,
) -> String
Expand description

Converts timestamps to a filename using ISO 8601 format.

This function converts two Unix nanosecond timestamps to a filename that uses ISO 8601 format with filesystem-safe characters. The format matches the Python implementation for consistency.

§Parameters

  • timestamp_1: First timestamp in Unix nanoseconds.
  • timestamp_2: Second timestamp in Unix nanoseconds.

§Returns

Returns a filename string in the format: “iso_timestamp_1_iso_timestamp_2.parquet”.

§Examples

let filename = timestamps_to_filename(
    UnixNanos::from(1609459200000000000),
    UnixNanos::from(1609545600000000000)
);
// Returns something like: "2021-01-01T00-00-00-000000000Z_2021-01-02T00-00-00-000000000Z.parquet"