Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

On the set_expires thing, the docs are at https://docs.rs/rocket/0.4.5/rocket/http/struct.Cookie.html#..., and “Tm” is a clickable link. Rocket 0.4 is using version 0.1 of the time crate, and the snippet in this article that looks into the time crate docs is looking at completely the wrong thing, time::Time::now from 0.2, which gets the time of day (which also, I think, helps explain the deprecation reason, because time of day in UTC is extremely seldom useful and can easily be obtained otherwise, while a full date + time in UTC is useful), rather than time::now from 0.1, which gets a timestamp.

Discussion of this article on /r/rust: https://old.reddit.com/r/rust/comments/hpzmeu/rust_is_surpri...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: