Skip to content
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

Optionally allow Chronos conversions for timezone handling #73

Closed
ChristopherRabotin opened this issue Aug 10, 2020 · 9 comments
Closed
Assignees

Comments

@ChristopherRabotin
Copy link
Member

This is helpful to support human-time which isn't UTC.

@ChristopherRabotin
Copy link
Member Author

This is getting useful when converting data from sources which do not use ISO.

@mpfaff
Copy link

mpfaff commented Apr 16, 2022

If you're considering optional chrono support, can you do the same for time?

@ChristopherRabotin
Copy link
Member Author

ChristopherRabotin commented Apr 16, 2022 via email

@mpfaff
Copy link

mpfaff commented Apr 17, 2022

My primary use for time (I prefer time over chrono) is formatting and parsing.

@ChristopherRabotin
Copy link
Member Author

ChristopherRabotin commented Apr 17, 2022 via email

@mpfaff
Copy link

mpfaff commented Apr 19, 2022

I don't currently have a use for hifitime where time/chrono wouldn't suffice. With that being said, if I were to use hifitime I would want to be able to parse and format RFC-3339 and get the current time from whatever system clock is available.

@ChristopherRabotin ChristopherRabotin changed the title Optionally allow Chronos conversions Optionally allow Chronos conversions for timezone handling Oct 2, 2022
@ChristopherRabotin
Copy link
Member Author

ChristopherRabotin commented Oct 4, 2022

Work plan:

  • Include offsets in RFC3339 format (these can be easily converted to a Duration)
  • If the time system is not recognized (e.g. BST), and the timezones feature is enabled, then the FromStr implementation should call chrono-tz to parse the timezone by identifier.
  • If timezones feature is enabled, then the chrono datetime type should be castable into an Epoch.

@ChristopherRabotin
Copy link
Member Author

Chrono-tz does not support converting a named timezone into an offset, only the other way around. Therefore, this issue cannot be completed as such.

Instead, this feature had focused on correctly parsing RFC3339.

@ChristopherRabotin
Copy link
Member Author

Parsing RFC3339 (zulu and with offset) and getting the system time is now available via #149 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants