Skip to main content

parse_execution_time

Function parse_execution_time 

Source
pub fn parse_execution_time(time_str: &str) -> Result<UnixNanos>
Expand description

Parse execution time string to UnixNanos.

Parse IB execution time to UnixNanos.

Supported IB formats:

  • “20230223 00:43:36 Universal”
  • “20230223 00:43:36 UTC”
  • “20230223 00:43:36 MET”
  • “20230223 00:43:36 America/New_York”
  • “20230223 00:43:36” (assumed UTC)
  • “20250225-15:15:00” (assumed UTC)

Timezones are resolved through Jiff’s bundled IANA tz database, so any region abbreviation or name that IB stamps the execution with (e.g. MET, EST, America/New_York) is honored, matching the v1 pandas-based parser. This matters because some IB accounts (e.g. European paper accounts) report a server timezone such as MET that the gateway cannot be coerced out of.

§Errors

Returns an error if the timestamp is malformed, the timezone is unrecognized, or the local time is non-existent (a DST spring-forward gap). DST fall-back folds resolve to the earliest matching instant.