OpenMemory MCP with memory timestamps in your time zone instead of US/Pacific.
The mem0/openmemory-mcp image bundles mem0ai 0.1.x, which stamps every memory's created_at / updated_at with a hardcoded Pacific time zone:
datetime.now(pytz.timezone("US/Pacific")).isoformat() # mem0/memory/main.pyThe instant is correct, but every timestamp reads -08:00/-07:00. Setting TZ on the container changes nothing. This image is the official one with only those calls replaced. The time zone now comes from:
MEM0_TIMEZONE, if set,- otherwise
TZ, - otherwise UTC. Invalid names are skipped, so a typo never breaks memory writes.
mem0 sunset OpenMemory and removed it from their repo in July 2026; the code survives only as a read-only archive in mem0ai/openmemory. Current mem0 (2.x) already uses UTC, so there is nothing upstream to fix. People still running OpenMemory need this patch.
git clone https://github.com/flakd/openmemory-tz
cd openmemory-tz
docker build -t flakd/openmemory-mcp-tz:latest .In your OpenMemory docker-compose.yml, change the MCP service's image and set a zone:
openmemory-mcp:
image: flakd/openmemory-mcp-tz:latest # was mem0/openmemory-mcp:latest
environment:
- TZ=America/New_York # or MEM0_TIMEZONE=...Then run docker compose up -d openmemory-mcp. Make sure OPENAI_API_KEY is set in that shell the same way you normally start the stack, because Compose reads it at up time.
Existing memories keep their old -08:00 stamps. They are the same instants, just written with a different offset. Only new and updated memories use the new zone.
patch_tz.py runs at build time, on top of the official image you already use. It replaces each pytz.timezone("US/Pacific") in mem0's memory/main.py and vector_stores/redis.py with a small helper. The build fails if it finds nothing to patch or any Pacific call is left, so a changed upstream image can't silently ship unpatched. Build from a pinned digest with --build-arg BASE_IMAGE=mem0/openmemory-mcp@sha256:....
uv run --no-project --with pytest --with pytz python -m pytest -qThe tests cover the patch, the fail-loud checks, and the MEM0_TIMEZONE → TZ → UTC fallback, including invalid names. Verified against mem0/openmemory-mcp:latest (mem0ai 0.1.108): new memories are stamped -05:00 with TZ=America/New_York.
Apache-2.0, the same as mem0 and OpenMemory. Not affiliated with mem0.