Closed jumbojets closed 4 years ago
the time crate also struct time::OffsetDateTime
documented here. it may be more appropriate instead and worth checking out
Hello @jamesetaylor3,
First of all, thank you for a great PR! I think sooner or later we'll need to release a new major version because of this deprecation. So I'm about to merge your PR.
As for using OffsetDateTime
instead, it's not necessary especially taking into account that we can use it along with time::PrimitiveDateTime
. I don't think something blocks us here unless I'm missing something.
Hey @AlexPikalov.
Thank you very much! I completely agree. OffsetDateTime
might not create extra value and instead add needless computer/programmer overhead. PrimitiveDateTime
seems like the best choice, and the most useful.
It all looks good--thanks again!
Looks like this also needs to be backported to async-tokio branch.
Hope you all are doing well! This is a solution to issue #343 .
time::Timespec
is deprecated in time 0.2.0 and is currently used as the rust type associated with Cassandra's timestamp datatype. This is a possible implementation usingtime::PrimitiveDateTime
. This code builds and has great performance on a project of mine. PrimitiveDateTime has many features--including serialization--while maintaining a low profile. Consequently, I believe it would be extremely useful for many users, and may be a good choice of replacement.However, because this pr eliminates
Timespec
, it is api breaking. If you have any other suggestions I can try something else out, but this is a possibility to start off with and explore.Check out the docs for
PrimitiveDateTime
here to learn more about it.