Open
Conversation
Bitbucket Cloud returns timestamps with 6-digit fractional seconds (e.g. 2025-09-15T08:53:36.337932+00:00). The PR extractor used time.Time directly for created_on/updated_on fields, causing a time.ParseError since Go's json.Unmarshal uses RFC3339 which does not accept microseconds. Fix: - Change BitbucketCreatedAt/BitbucketUpdatedAt in BitbucketApiPullRequest struct from time.Time to *common.Iso8601Time - Add microsecond format (6-digit fractional seconds) to DateTimeFormats in Iso8601Time, before the existing 3-digit format, so that ConvertStringToTime correctly parses these timestamps Fixes apache#8708
Adds ConvertStringToTime test cases for: - 3-digit millisecond precision (existing format) - 6-digit microsecond precision (Bitbucket Cloud format, fixes apache#8708)
klesh reviewed Mar 19, 2026
Contributor
klesh left a comment
There was a problem hiding this comment.
Please fix the linting error so I can merge it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bitbucket Cloud returns timestamps with 6-digit fractional seconds (e.g. 2025-09-15T08:53:36.337932+00:00). The PR extractor used time.Time directly for created_on/updated_on fields, causing a time.ParseError since Go's json.Unmarshal uses RFC3339 which does not accept microseconds.
Fix:
Fixes #8708
pr-type/bug-fix,pr-type/feature-development, etc.Summary
What does this PR do?
Bitbucket Cloud returns timestamps with 6-digit microsecond precision (e.g.
2025-09-15T08:53:36.337932+00:00). The PR extractor storedcreated_onandupdated_ondirectly astime.Time, which caused atime.ParseErrorduring extraction because Go'sjson.Unmarshaluses RFC3339 — a format that does not accept microseconds.Does this close any open issues?
Closes #8708
Screenshots
Other Information
Developed with the assistance of an AI coding agent. While I am not proficient in Go, I have a general software engineering background and verified that the fix is minimal, targeted, and does not introduce regressions.