You're thinking of creating a custom storage format for anything related to time. Don't.
-
-
Replying to @joelquen
i gather you have just had some kind of experience :) would you ever make a custom postgres type?
2 replies 0 retweets 0 likes -
Postgres stores time as an i64 for seconds and a u32 for subsecond nanos as an offset from a known time. Why would you want anything else?
1 reply 0 retweets 0 likes -
Does those work for storing a time of day (e.g. 6:35 PM) that's not connected to a date?
1 reply 0 retweets 0 likes -
Time is stored as an i64 which is microseconds since midnight.
1 reply 0 retweets 0 likes -
That's the way to do it2 replies 0 retweets 0 likes
Also I lied about timestamps it's just one i64. http://docs.diesel.rs/diesel/pg/data_types/struct.PgTimestamp.html …
1:25 PM - 23 Feb 2017
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.