Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@gretadj2
Copy link
Contributor

Fixing an error thrown trying to parse a grid, containing a datetime with one of the 3 non-GMT timezones having an hyphen (-) in their names:

"Blanc-Sablon",
"Port-au-Prince",
"Ust-Nera"

Example:

ver:"3.0"
val
2025-06-12T10:06:06.584-04:00 Port-au-Prince

image

What was happening is that the parser stopped when it encountered the - char after Port, since it was not preceded by GMT. So the datetime was truncated to 2025-06-12T08:24:25.631-04:00 Port.
Then, when the parser resumes, it would expect a comma or newline to delimit the value, instead it finds an hyphen, and throws an error.

When parsing a simple value instead of a grid, no error was thrown, but the timezone would still be truncated: 2025-06-12T08:24:25.631-04:00 Port

@gretadj2 gretadj2 self-assigned this Jun 12, 2025
@gretadj2 gretadj2 added the bug Something isn't working label Jun 12, 2025
@gretadj2 gretadj2 marked this pull request as ready for review June 12, 2025 14:18
@garethj2 garethj2 merged commit 5c44e85 into master Jun 12, 2025
1 check passed
@garethj2 garethj2 deleted the fix/zinc-reader-timezone-parse branch June 12, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants