ruma / homeserver

A Matrix homeserver written in Rust.
https://www.ruma.io/
1.08k stars 41 forks source link

Switch from PgTimestamp to SystemTime. #152

Open farodin91 opened 7 years ago

farodin91 commented 7 years ago

This would make calculations easier. It's also increase the support of different Database types. Diesel will start to support mysql in future.

jimmycuadra commented 7 years ago

As long as Diesel supports SystemTime (which it looks like it does) this sounds good to me!

mujx commented 7 years ago

One problem that came up in #137 is how to go from seconds (u64 etc) to SystemTime so that can be used in diesel queries. Maybe there is a workaround? We used the time crate (which is really missing from the std) for the conversions.

farodin91 commented 7 years ago

Could be better to switch NaiveDateTime form chrono.

mujx commented 7 years ago

In general we should try to eliminate u64 and i64 where we can when it comes to timestamps.

jimmycuadra commented 7 years ago

chrono would be fine if the stdlib time APIs don't cut it.