mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 06:02:06 -05:00
[PR #4803] [MERGED] fix: DeprecationWarning for datetime.utcnow() by using datetime.now(UTC) #8366
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/4803
Author: @CJDaniel96
Created: 8/22/2024
Status: ✅ Merged
Merged: 8/22/2024
Merged by: @tjbck
Base:
dev← Head:dev📝 Commits (5)
ed92205Merge pull request #4789 from open-webui/dev50d53c6Merge pull request #4790 from open-webui/dev847ca66Merge pull request #4795 from open-webui/deve2b7296Merge pull request #4798 from open-webui/dev89ebbedfix: DeprecationWarning for datetime.utcnow() by using datetime.now(UTC)📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
backend/utils/utils.py(+2 -2)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
To resolve this issue, I replaced datetime.utcnow() with datetime.now(UTC) to use timezone-aware objects to represent datetimes in UTC.
Added
Changed
Deprecated
Removed
Fixed
datetime.utcnow()withdatetime.now(UTC)to use timezone-aware objects to represent datetimes in UTC.Security
Breaking Changes
Additional Information
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.