Parse a timestamp from an API response into POSIXct
parse_api_datetime.RdBoth APIs report timestamps as ISO 8601 with a T separator, microseconds
and a Z suffix (e.g. "2026-08-20T02:42:43.000000Z", measured against
marks.spdgt.com). None of as.POSIXct()'s default formats match that:
it tries the space-separated ones, fails, then falls back to "%Y-%m-%d",
which matches the leading date and silently discards the time. A token
expiring at 02:42 was therefore stored as midnight, and auth_status()
reported a live token as expired.
Value
POSIXct in UTC. NULL when x is absent or does not parse —
NULL rather than NA because a missing expiration reads as "no
expiration" everywhere it is used, while NA would break the
exp < Sys.time() comparison in auth_status().