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

Add a FixedOffset parser #314

Closed
linkmauve opened this issue Apr 22, 2019 · 1 comment
Closed

Add a FixedOffset parser #314

linkmauve opened this issue Apr 22, 2019 · 1 comment

Comments

@linkmauve
Copy link

In my project, an XMPP element parser, I need to be able to parse a timezone on its own, in order to implement XEP-0202.

I’m currently using a super ugly workaround by creating a DateTime from a random date concatenated with the timezone I want to parse, and then extracting the timezone from it.

A correct way to implement that could be to impl std::str::FromStr for FixedOffset, which would return only the timezone information and reject any other string.

yshui added a commit to yshui/chrono that referenced this issue May 28, 2023
yshui added a commit to yshui/chrono that referenced this issue May 28, 2023
mcronce pushed a commit to mcronce/chrono that referenced this issue Jun 28, 2023
@pitdicker
Copy link
Collaborator

Fixed in #1157.

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

No branches or pull requests

2 participants