You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Installation and Bot reject ISO 8601 timestamps with a negative UTC offset or a Z suffix #1989
Installation, Bot and the token rotation code accept installed_at (and *_token_expires_at) as an ISO 8601 string. Strings with a positive offset parse correctly, but a negative offset or a Z suffix raises ValueError:
"2021-07-14T17:00:17+09:00" works, so the result depends on the sign of the offset.
What should happen
Any string datetime.fromisoformat can parse should be accepted. Strings without an offset should keep being treated as UTC.
Root cause
_from_iso_format_to_datetime in slack_sdk/oauth/installation_store/internals.py decides whether a string already has an offset by checking for a + character:
For -05:00 or Z there is no +, so a second offset is appended and parsing fails. Parsing first and setting UTC only when tzinfo is None fixes it, which matches how naive datetime values are already handled in _timestamp_to_type since #1970.
Hi, @auraseb! Thanks so much for submitting this bug and opening a fix for it, I was able to confirm it on my end. I saw my teammate is taking a look at it, please make sure you sign the Salesforce Inc. Contributor License Agreement so we can proceed with your contribution once it's in a good state to merge!
Activity
hello-ashleyintech commentedon Oct 20, 2026
Hi, @auraseb! Thanks so much for submitting this bug and opening a fix for it, I was able to confirm it on my end. I saw my teammate is taking a look at it, please make sure you sign the Salesforce Inc. Contributor License Agreement so we can proceed with your contribution once it's in a good state to merge!