Skip to content

Commit

Permalink
Update m365_service_health.py
Browse files Browse the repository at this point in the history
Replace datetime.strptime with datetime.fromisoformat
  • Loading branch information
CLiX-1 authored Jul 1, 2024
1 parent 5abb8aa commit 6cac565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion m365/agent_based/m365_service_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def check_m365_service_health(item: str, params: Mapping[str, Any], section: Sec
result_details_list = []
for issue in service_issues:
issue_start = issue.get("issue_start")
issue_start_timedate_utc = (datetime.strptime(issue_start, "%Y-%m-%dT%H:%M:%SZ")).replace(tzinfo=timezone.utc)
issue_start_timedate_utc = datetime.fromisoformat(issue_start)
issue_start_timestamp = issue_start_timedate_utc.timestamp()
issue_title = issue.get("issue_title")
issue_feature = issue.get("issue_feature")
Expand Down

0 comments on commit 6cac565

Please sign in to comment.