[PR #24352] [Chore/Refactor] Use centralized naive_utc_now for UTC datetime operations #30589

Closed
opened 2026-02-21 20:47:50 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/24352

State: closed
Merged: Yes


Summary

  • Replace inline datetime.now(tz=UTC).replace(tzinfo=None) with centralized naive_utc_now() utility
  • Import naive_utc_now from libs.datetime_utils module
  • Remove unused datetime imports

Related Issue

Closes #24351

Test Plan

  • Code changes are covered by existing tests
  • No functional changes, only refactoring for consistency
  • Verified the naive_utc_now() function returns the same result as the replaced pattern
**Original Pull Request:** https://github.com/langgenius/dify/pull/24352 **State:** closed **Merged:** Yes --- ## Summary - Replace inline `datetime.now(tz=UTC).replace(tzinfo=None)` with centralized `naive_utc_now()` utility - Import `naive_utc_now` from `libs.datetime_utils` module - Remove unused datetime imports ## Related Issue Closes #24351 ## Test Plan - [x] Code changes are covered by existing tests - [x] No functional changes, only refactoring for consistency - [x] Verified the `naive_utc_now()` function returns the same result as the replaced pattern
yindo added the pull-request label 2026-02-21 20:47:50 -05:00
yindo closed this issue 2026-02-21 20:47:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30589