Time crate status


So, the std::time module has been deprecated, if i’m not mistaken, and it’s replacement rust-lang/time seems to be in some need of love. It’s hard to find good information on what’s going on with time management functionality.

I would like to know why std::time::Duration was deprecated, and what I could do to help provide a stable time module I would be delighted to use. To me Duration seemed like the start of something great. What happened?


The problem is that handling time well is something very complex. Introducing a complex and incomplete library in std may cause misuse and/or bloat.

Java is a good example of problem. They made a simple Date object first, but since it was too naive they add Calendar later. But it was still far from perfect and complex to use. People who wanted a good time support had to use an external library(usually JodaTime). So in Java 8, Oracle has introduced a new Time API (JSR320) carefully designed based on the DateTime obejct.

So there is now 3 way of handling Date in the JavaAPI, none can be removed because of backward compatibility and most of the users still use the bad designed one.


Well explained.

And I guess that a main issue is that the time module it isn’t very high up on the priority list. I do rather wait for a well-implemented time API in a post-1.0 version than live with one, or several, lacking in quality.