Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

Addresses feedback from #12536 to use timezone-aware datetime objects in the SSH key write access deprecation check.

Changes

  • Updated datetime comparison to use UTC timezone (datetime.timezone.utc) from Python's standard library
  • No external dependencies required (removed pytz in favor of standard library)

Before:

hard_failure = datetime.datetime.now() >= datetime.datetime(2025, 12, 1)

After:

now = datetime.datetime.now(tz=datetime.timezone.utc)
hard_failure = now >= datetime.datetime(2025, 12, 1, 0, 0, 0, tzinfo=datetime.timezone.utc)

This prevents inconsistent behavior across different server timezones and uses UTC (UTC+0) as the standard timezone for server-side operations.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] WIP address feedback on SSH keys cutoff date implementation Use timezone-aware datetime for SSH key cutoff date comparison Oct 29, 2025
Copilot AI requested a review from stsewd October 29, 2025 18:52
Copilot finished work on behalf of stsewd October 29, 2025 18:52
@stsewd
Copy link
Member

stsewd commented Oct 29, 2025

@copilot what about making it utc-0 instead?

Copy link
Contributor Author

Copilot AI commented Oct 29, 2025

@copilot what about making it utc-0 instead?

Changed to use UTC (datetime.timezone.utc) instead of Pacific Time. This also removes the pytz dependency in favor of the standard library. Changes made in commit d187a8d.

Copilot finished work on behalf of stsewd October 29, 2025 18:58
@stsewd stsewd marked this pull request as ready for review October 29, 2025 19:01
@stsewd stsewd requested a review from a team as a code owner October 29, 2025 19:01
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

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

Good bot

@stsewd stsewd merged commit 11a07a1 into final-cutoff-date-ssh-keys Oct 29, 2025
2 of 4 checks passed
@stsewd stsewd deleted the copilot/sub-pr-12536 branch October 29, 2025 19:01
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.

2 participants