-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delegate TimeZones to chrono via cfg; support relativistic time correction #12
Comments
Note: this comment supersedes the one above. Rust's chrono has excellent time zone management and parsing. Rewriting all these features wouldn't serve a ton of purpose. Support for leap seconds is especially useful for simulation environments where such high precision is important. Moreover, in several such situations, reference frames may be moving very fast compared to Earth (where TAI is based), and in the spirit of this library, it's important to show how such relativistic corrections can be applied. References for implementation include ESA's navipedia. Furthermore, if relativistic corrections are supported, it's trivial to support fixed offset timezones. More complex formatting and parsing shall be handled through chrono. Chrono will be integrated as an optional dependency using an implementation similar to the one proposed here. The purpose of this is to allow for compatibility between chrono and hifitime without requiring it since it's likely that most implementations will not need all the features of chrono. This library should also support clock instabilities, but that's for a bit later. |
|
Currently,
TimeZone
s aren't trivial to handle, as evident intests/tz.rs
. Even making animpl
macro, as demonstrated here is not easy from that implementation.It should be easy to convert a Utc to any other time zone object.
I guess that there needs to be some "generic date time container struct" which would house to computed date time with the computed offset, allowing for easy back and forth computations. Moreover, I don't think it's a great idea to require each
TimeZone
implementation to also implementfmt::Display
: they will all be very similar so there needs to be a simple way to do this...The text was updated successfully, but these errors were encountered: