logoalt Hacker News

Arch485 • yesterday at 8:57 PM • 1 reply • view on HN

I'm really curious - what makes you say chrono's API sucks?

I've used it in several projects, and to me it seems just fine. Granted, I don't do a lot of cross-time zone work; I exclusively use UTC whenever possible.


Replies

lifthrasiir • yesterday at 11:07 PM

A commonly cited reason is that it mixes Option<T> and Result<T, E> for error handling. It was designed well before Rust's API convention is settled, and I also wrongly assumed that some features like procedural macros would be delivered soon (which was why `ymd` and such panic on error, error handling would happen in the macros then).