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 GEMPAK date parsing #2231

Merged
merged 3 commits into from
Nov 30, 2021
Merged

Fix GEMPAK date parsing #2231

merged 3 commits into from
Nov 30, 2021

Conversation

sgdecker
Copy link
Contributor

Description Of Changes

Uses a formatted string to make sure integers with leading zeroes retain those leading zeroes.

Checklist

Fixes Unidata#2229

The code implicitly assumed the date integer from GEMPAK has six
characters, but an integer like 000102 (for January 2, 2000) will be
reduced to 102 during the string conversion.  Here, a formatted string
is used to make sure any leading zeroes are kept.
@sgdecker sgdecker requested a review from a team as a code owner November 30, 2021 15:00
@sgdecker sgdecker requested review from dcamron and removed request for a team November 30, 2021 15:00
@sgdecker
Copy link
Contributor Author

I guess I didn't set up the test properly for Github, but I'm not sure what I did wrong.

@dopplershift dopplershift added Area: IO Pertains to reading data Type: Bug Something is not working like it should labels Nov 30, 2021
@dopplershift dopplershift added this to the 1.2.0 milestone Nov 30, 2021
@dopplershift
Copy link
Member

Thanks for contributing the fix! This looks good.

@dopplershift dopplershift enabled auto-merge (squash) November 30, 2021 21:32
@dopplershift dopplershift merged commit 5bb9703 into Unidata:main Nov 30, 2021
@sgdecker sgdecker deleted the gem_sfc_fix branch December 6, 2021 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: IO Pertains to reading data Type: Bug Something is not working like it should
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GempakSurface parses date incorrectly
2 participants