Add RFC3339 formats with offset#1705
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a last resort fallback mechanism to the KubernetesDateTimeOffsetConverter to handle DateTimeOffset parsing for edge cases not covered by the strict RFC3339 format variants. The change aims to make the parser more lenient by falling back to general DateTimeOffset.TryParse when specific format parsing fails.
- Introduces a static
StandardFormatsarray to avoid repeated array allocation - Adds a fallback using general
DateTimeOffset.TryParsewithDateTimeStyles.RoundtripKind - Removes redundant array allocation in line 52 by passing the format string directly
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, luiscantero The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fb26f62
into
kubernetes-client:master
Fixes #1704