replace hardcoded US/Pacific timezone references with timezone.utc#4404
Merged
kartik-mem0 merged 4 commits intomem0ai:mainfrom Mar 19, 2026
Merged
replace hardcoded US/Pacific timezone references with timezone.utc#4404kartik-mem0 merged 4 commits intomem0ai:mainfrom
kartik-mem0 merged 4 commits intomem0ai:mainfrom
Conversation
…mp-utc Merge upstream
- Add _normalize_iso_timestamp_to_utc() helper to convert existing timezone-aware timestamps (e.g. US/Pacific -07:00) to UTC on read - Apply normalization on all read/update paths (sync + async) - Add tests for create/update UTC timestamps and normalization Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # mem0/memory/main.py
kartik-mem0
approved these changes
Mar 19, 2026
Closed
9 tasks
This was referenced Mar 23, 2026
jamebobob
pushed a commit
to jamebobob/mem0-vigil-recall
that referenced
this pull request
Mar 29, 2026
…em0ai#4404) Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
This was referenced Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Timestamps for
created_atandupdated_atare hardcoded to US/Pacific, which produces incorrect dates for non-Pacific users and breaks date-range filtering (especially near UTC midnight). This replaces allpytz.timezone("US/Pacific")references with stdlibdatetime.timezone.utcand removes the unusedpytzimports.Fixes #4402
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Exiting tests pass. The change is a straightforward timezone constant swap with no logic changes.
Checklist:
Maintainer Checklist
created_atandupdated_athardcoded to US/Pacific instead of UTC #4402