postgres/sqlalchemy display of timestamptz loses my local timezone
Author: drewpCreated Sep 4, 2025Updated Sep 13, 2026
Labelsbughelp wanted
Describe the bug
I'm running marimo with this dockerfile:
FROM ghcr.io/marimo-team/marimo:0.15.2-sql
RUN uv pip install --no-cache-dir sqlalchemy psycopg2-binary
RUN apt-get install -y tzdata
ENV TZ=America/Los_Angeles
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN useradd --uid 501 user501
USER user501I expected (1) to display in my local tz just like the TO_JSON() version does (2).
Will you submit a PR?
- Yes
Environment
{
"marimo": "0.15.2",
"editable": false,
"OS": "Linux",
"OS Version": "6.14.0-27-generic",
"Processor": "",
"Python Version": "3.13.7",
"Binaries": {
"Browser": "--",
"Node": "--"
},
"Dependencies": {
"click": "8.2.1",
"docutils": "0.22",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.8.2",
"narwhals": "2.2.0",
"packaging": "25.0",
"psutil": "7.0.0",
"pygments": "2.19.2",
"pymdown-extensions": "10.16.1",
"pyyaml": "6.0.2",
"starlette": "0.47.3",
"tomlkit": "0.13.3",
"typing-extensions": "4.15.0",
"uvicorn": "0.35.0",
"websockets": "15.0.1"
},
"Optional Dependencies": {
"altair": "5.5.0",
"duckdb": "1.3.2",
"nbformat": "5.10.4",
"openai": "1.102.0",
"pandas": "2.3.2",
"polars": "1.32.3",
"pyarrow": "21.0.0",
"loro": "1.5.4",
"python-lsp-ruff": "2.2.2",
"python-lsp-server": "1.13.1",
"ruff": "0.12.11",
"sqlglot": "27.10.0"
},
"Experimental Flags": {
"sql_linter": true
}
}Code to reproduce
No response
Source: marimo-team/marimo