Repository navigation
fix(client): keep leading zeros when converting protobuf timestamps - #862
Merged
xepozz merged 1 commit intoNov 29, 2026
Merged
Conversation
pcbeingused333
requested review from
a team,
roxblnfk and
wolfy-j
as code owners
November 28, 2026 22:26
xepozz
approved these changes
Nov 29, 2026
Collaborator
|
Thank you! |
xepozz
added a commit
that referenced
this pull request
Nov 29, 2026
BackfillRequest comes from the marshalled BackfillPeriod, matching times use Timestamp::fromDateTime(). The psalm baseline follows the ProtoToArrayConverter change from #862.
xepozz
added a commit
that referenced
this pull request
Nov 29, 2026
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.
ProtoToArrayConverterconverts a protobufTimestampwithsprintf('%d.%d', $seconds, $nanos / 1000)and parses the result with theU.uformat. The microseconds are not zero-padded, so any value below 100000 µs is read as a larger fraction: 5 ms (nanos = 5000000) becomes.5000, which is parsed as 500 ms.The converter is used by
ScheduleClientandScheduleHandle, so the timestamps in schedule listings and descriptions can be off by up to about a second.The fix pads the fraction to six digits (
%06d).Validation
Added
testTimestampKeepsLeadingZerosOfMicrosecondstoProtoToArrayConverterTestCase. Without the change it fails (1700000000.500000instead of1700000000.005000) and with it the test passes.This change was prepared with AI assistance.