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

Fix positive UTC offset parsing in DateTimeConverter #764

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

Rob-Hague
Copy link
Contributor

@Rob-Hague Rob-Hague commented Mar 25, 2023

The sign of the offset was not being considered which happened to work for negative offsets. Positive offsets would be adjusted in the wrong direction which was not caught due to an incorrect test.

I have a larger change/proposal coming in a separate PR (edit: #765). This one is a bit easier to digest.

kirsan31 added a commit to kirsan31/quickfixn that referenced this pull request Aug 18, 2023
@@ -71,8 +71,8 @@ private static System.DateTime ConvertFromNanoString(string str, string[] format
{
// GMT offset
int n = dec.Contains("+") ? dec.IndexOf('+') : dec.IndexOf('-');
kind = System.DateTimeKind.Utc;
offset = int.Parse(dec.Substring(n + 1));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, this + 1 😞

Good catch

Rob-Hague and others added 2 commits January 18, 2024 13:58
The sign of the offset was not being considered which happened to work for
negative offsets. Positive offsets would be adjusted in the wrong direction
which was not caught due to an incorrect test.
@gbirchmeier
Copy link
Member

I rebased and updated release notes. Will merge when checks pass. Thanks!

@gbirchmeier gbirchmeier merged commit cf2e3f9 into connamara:master Jan 18, 2024
2 checks passed
@Rob-Hague Rob-Hague deleted the datetimefix branch January 18, 2024 20:56
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

Successfully merging this pull request may close these issues.

2 participants