Skip to content

{Profile} use UTC timezone when converting expiration timestamps to strings#14718

Closed
bluca wants to merge 1 commit intoAzure:devfrom
bluca:token_expire_timezone
Closed

{Profile} use UTC timezone when converting expiration timestamps to strings#14718
bluca wants to merge 1 commit intoAzure:devfrom
bluca:token_expire_timezone

Conversation

@bluca
Copy link
Member

@bluca bluca commented Aug 8, 2020

datetime.fromtimestamp will use the machine's locale timezone by
default, causing expiration timestamps to vary depending on the
local setting. Use UTC to ensure they are stable.

Among other things, test_get_raw_token from test_profile_custom.py fails if the machine is not using UTC as the timezone

…trings

datetime.fromtimestamp will use the machine's locale timezone by
default, causing expiration timestamps to vary depending on the
local setting. Use UTC to ensure they are stable.
@bluca bluca requested review from arrownj and jiasli as code owners August 8, 2020 14:55
@yonzhan yonzhan added this to the S174 milestone Aug 8, 2020
@yonzhan yonzhan requested a review from jsntcy August 8, 2020 23:09
@yonzhan
Copy link
Collaborator

yonzhan commented Aug 8, 2020

add to S174

@jiasli
Copy link
Member

jiasli commented Sep 11, 2020

Thank you for the contribution.

However, forcing the expiresOn to be in UTC will introduce a BREAKING CHANGE which we are trying to avoid without absolute necessity.

I am fixing the test in #15131 and cherry-picked ea0b891 so that you receive credit for this PR.

@jiasli jiasli closed this Sep 11, 2020
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.

3 participants