Skip to content

Replace deprecated UTC datetime helpers#399

Draft
Mirochill wants to merge 1 commit into
balena-io:masterfrom
Mirochill:fix-377-utcnow-deprecation
Draft

Replace deprecated UTC datetime helpers#399
Mirochill wants to merge 1 commit into
balena-io:masterfrom
Mirochill:fix-377-utcnow-deprecation

Conversation

@Mirochill

Copy link
Copy Markdown

Fixes #377.

Summary

  • replace deprecated datetime.utcnow() / datetime.utcfromtimestamp(0) usage with timezone-aware UTC timestamps
  • update support-access timestamp checks and token age calculation to use datetime.now(timezone.utc).timestamp()
  • update history/API-key examples, generated docs, and functional test timestamp helpers

Validation

  • git diff --check
  • rg -n utcnow|utcfromtimestamp|datetime\.UTC balena tests DOCUMENTATION.md README.md
  • Not run locally

@flowzone-app

flowzone-app Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

A repository maintainer needs to approve these workflow run(s).

To approve, maintainers can either:

Submit an approval review on this pull request, OR

Submit a review comment starting with /deploy

Then re-run the failed job(s) via the Checks tab above.

Reviews must be on the specific commit SHA of the workflow run to be considered.

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.

datetime.datetime.utcnow() is deprecated

1 participant