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 is_valid_timestamp for strings with timezone #417

Merged
merged 6 commits into from
Feb 6, 2025

Conversation

g-marconet
Copy link
Contributor

@g-marconet g-marconet commented Feb 5, 2025

Description

  • Timestamp format was %Y-%m-%dT%H:%M:%SZ
    • This works fine with times in UTC (with a "Z" at the end), but doesn't parse non-UTC timezones
  • Gitlab seems to not use UTC. This example was taken from their docs: 2024-06-28T03:44:20-07:00
    • This would fail with the previous timestamp format

Motivation and Context

Previously, this bug would cause issues retrieving timestamp information for Gitlab.

How Has This Been Tested?

Tested in dev environment and by crafting strings

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change

Checklist

  • My code follows conforms to the coding standards.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@g-marconet g-marconet changed the title Fix TIMESTAMP_FORMAT timezone Fix is_valid_timestamp for strings with timezone Feb 5, 2025
@g-marconet g-marconet marked this pull request as ready for review February 5, 2025 22:18
@g-marconet g-marconet requested a review from a team as a code owner February 5, 2025 22:18
Copy link
Contributor

@ZoogieZork ZoogieZork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need a documentation update.

@g-marconet g-marconet merged commit 1f0ac7d into main Feb 6, 2025
6 checks passed
@g-marconet g-marconet deleted the g-marconet/timestamp-fix branch February 6, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants