Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport something useful for timestamps on stable #92
Comments
sgrif
added
enhancement
accepted
labels
Jan 13, 2016
This comment has been minimized.
tomhoule
commented
Jan 13, 2016
|
Well, I have been playing a little with diesel and I wrote a rough port of the rust-postgres support for It assumes everything is UTC and does not try to deal with timezones at the moment, but it should be possible at least to the same extent as what exists in rust-postgres. The rust-postgres implementation of the feature is in this file If it can be of any help, I can share, expand, complete and polish up the code, write tests and make a PR. |
This comment has been minimized.
|
Sure. If you want to open a PR with what you have, I can do the legwork on finishing it up, too. |
This comment has been minimized.
|
Also I think the only tests that we need for this are an entry in https://github.com/sgrif/diesel/blob/master/diesel_tests/tests/types_roundtrip.rs#L76 It is a shame that we need this in diesel proper -- I really wish that we could make |
This comment has been minimized.
tomhoule
commented
Jan 14, 2016
|
I worked a little on this, I doubt it is fully functional, but I’ll open a PR right away so you can see if it is worth continuing. My first implementation was in application code, but of course I had to wrap it in a newtype, and write down the serde traits for serialization, etc. So that was not particularly ergonomic. |
This comment has been minimized.
|
Yeah, that's the main benefit of doing it in crate is not needing to newtype it. |
This comment has been minimized.
|
The only remaining type for this is #106 has been added as a separate tracking issue for figuring out how we should handle timezone aware types. |
sgrif commentedJan 13, 2016
Rust's Timespec isn't stable. We should optionally support
chrono.