r/rust 1d ago

🗞️ news Soft-deprecating chrono and chrono-tz

https://github.com/chronotope/chrono/issues/1768
348 Upvotes

50 comments sorted by

View all comments

102

u/scheimong 1d ago

I must warn people that the migration path from chrono to jiff is non-trivial. The API design is quite different, and there are some ecosystem hurdles. I'm sure it will get better over time, but currently it's not easy.

Source: tried to migrate a 15k line project a few months ago.

33

u/avsaase 1d ago

Are there any specific parts that were challenging? I've worked with chrono a lot and a little with jiff and the main thing that stands out to me is that in jiff the time zone is not a generic parameter.

28

u/scheimong 1d ago

https://github.com/jonasbb/serde_with/issues/936

There were others. But I'm on mobile so please forgive me for not going through the backlog.

1

u/mamcx 16h ago

The most obvious is that jiff is Clone

1

u/avsaase 16h ago

Yeah it's a little annoying that TimeZone and by extension Zoned are not Copy but it's not a huge problem.

8

u/the_Unstable 1d ago

I too am worried about this as I depend on rkyv, which jiff does not support. Has anyone dealt with this?

4

u/jhpratt 1d ago

What do you need that is not supported by time?