⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Support ISO8601-ish format on expires_on in MI#804

Open
rayluo wants to merge 1 commit intodevfrom
mi-expires-on
Open

Support ISO8601-ish format on expires_on in MI#804
rayluo wants to merge 1 commit intodevfrom
mi-expires-on

Conversation

@rayluo
Copy link
Contributor

@rayluo rayluo commented Mar 27, 2025

@rayluo rayluo requested a review from a team as a code owner March 27, 2025 17:29
"1/1/1970 12:0:12 PM +00:00": 43212,
"1/16/2020 5:24:12 AM +00:00": 1579152252, # Derived from https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.21.0/sdk/identity/azure-identity/azure/identity/_credentials/azure_ml.py#L51
}.items():
self.assertEqual(_parse_expires_on(input), epoch, f'Should parse "{input}" to {epoch}')

Choose a reason for hiding this comment

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

would be good to have these as well.

"2025-01-01T00:00:00Z": 1735689600, (Z/Zulu Suffix)
"2025-01-01T00:00:00+00:00": 1735689600, (No fractional seconds)

Copy link

@gladjohn gladjohn left a comment

Choose a reason for hiding this comment

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

looks good @rayluo

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.

[Bug] Fix Date-Time Parsing in Token Expiration Calculation for Multiple Formats

2 participants