Here is a sample ARI payload from pebble that I generated while testing ARI functions
{'payload': {'suggestedWindow': {'start': '2025-02-11T21:19:27.333333334Z', 'end': '2025-02-13T21:19:27.333333334Z'}}, 'headers': {'Cache-Control': 'public, max-age=0, no-cache', 'Content-Type': 'application/json; charset=utf-8', 'Link': 'https://127.0.0.1:14000/dir;rel="index"', 'Retry-After': '21600', 'Date': 'Wed, 12 Feb 2025 21:17:17 GMT', 'Content-Length': '127'}, 'status_code': 200}
Note the time resolution is in nanoseconds:
2025-02-11T21:19:27.333333334Z
While go natively handles precision in nanoseconds, other languages do not -- including Python:
2025-02-11T21:19:27.333333334Z # go precision
2025-02-11T21:19:27.333334Z # Python precision
On Python, one needs to manipulate the timestamp as a string to remove the extra precision before using datetime.datetime.strptime
I'm not sure how this didn't pop up before on my tests. Maybe dropping the lifetime of the certs to something arbitrarily short surfaced this. The only mention I've found is here: https://community.letsencrypt.org/t/thoughts-from-starting-to-play-with-ari/200276/20
IMHO, it would be nice if pebble/boulder/rfc limited the precision to microseconds as Go is an outlier in terms of supporting nanosecond precision.
Here is a sample ARI payload from pebble that I generated while testing ARI functions
Note the time resolution is in nanoseconds:
While
gonatively handles precision in nanoseconds, other languages do not -- including Python:On Python, one needs to manipulate the timestamp as a string to remove the extra precision before using
datetime.datetime.strptimeI'm not sure how this didn't pop up before on my tests. Maybe dropping the lifetime of the certs to something arbitrarily short surfaced this. The only mention I've found is here: https://community.letsencrypt.org/t/thoughts-from-starting-to-play-with-ari/200276/20
IMHO, it would be nice if pebble/boulder/rfc limited the precision to microseconds as Go is an outlier in terms of supporting nanosecond precision.