Skip to content

Conversation

kartubi
Copy link

@kartubi kartubi commented Aug 28, 2025

Improves timezone handling for OAuth2 access and refresh token expiration dates by:

  • Add optional timezone parameter to getAccessTokenExpiresAt() and getRefreshTokenExpiresAt() methods
  • Update getDateFromSeconds() to accept timezone parameter and use DateTime with proper timezone conversion
  • Default to UTC timezone to maintain backward compatibility
  • Include timezone identifier in returned date strings for clarity

This resolves confusion where expiration dates were displayed in server's local timezone without indication, causing users to see incorrect expiration times. Now users can specify their preferred timezone or rely on clear UTC display.

Example usage:

  • getAccessTokenExpiresAt() returns "2025/08/28 15:12:34 UTC"
  • getAccessTokenExpiresAt('Asia/Jakarta') returns "2025/08/28 22:12:34 Asia/Jakarta"

Fixes issue where token expiration appeared to be set incorrectly due to timezone conversion problems.

Improves timezone handling for OAuth2 access and refresh token expiration dates by:

- Add optional timezone parameter to getAccessTokenExpiresAt() and getRefreshTokenExpiresAt() methods
- Update getDateFromSeconds() to accept timezone parameter and use DateTime with proper timezone conversion
- Default to UTC timezone to maintain backward compatibility
- Include timezone identifier in returned date strings for clarity

This resolves confusion where expiration dates were displayed in server's local timezone without indication, causing users to see incorrect expiration times. Now users can specify their preferred timezone or rely on clear UTC display.

Example usage:
- getAccessTokenExpiresAt() returns "2025/08/28 15:12:34 UTC"
- getAccessTokenExpiresAt('Asia/Jakarta') returns "2025/08/28 22:12:34 Asia/Jakarta"

Fixes issue where token expiration appeared to be set incorrectly due to timezone conversion problems.
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.

1 participant