ostk.astrodynamics.converters.coerce_to_iso

coerce_to_iso(
value: Instant | datetime | str,
timespec: str = 'microseconds',
) str

Return an ISO string from value.

Parameters:
  • value (Instant | datetime | str) -- A value to coerce.

  • timespec (str) -- A time resolution. Defaults to "microseconds".

Returns:

The coerced ISO string.

Return type:

str