iso8601

Function iso8601 

Source
pub fn iso8601(timestamp: i64) -> Result<String>
Expand description

Converts a timestamp in milliseconds to an ISO 8601 formatted string

§Arguments

  • timestamp - Timestamp in milliseconds since Unix epoch

§Returns

ISO 8601 formatted string in UTC timezone (e.g., “2024-01-01T12:00:00.000Z”)

§Example

use ccxt_core::time::iso8601;

let timestamp = 1704110400000; // 2024-01-01 12:00:00 UTC
let iso_str = iso8601(timestamp).unwrap();
assert_eq!(iso_str, "2024-01-01T12:00:00.000Z");