marimo-team/marimo

incorrect/inappropriate timezone in dataframe view

Closed this issue · 3 comments

Describe the bug

when displaying a datetime column without a time zone, the dataframe display incorrectly converts the timezone to UTC and displays the datetime with the Z suffix

Environment

{
  "marimo": "0.9.15",
  "OS": "Linux",
  "OS Version": "5.15.0-91-generic",
  "Processor": "x86_64",
  "Python Version": "3.12.6",
  "Binaries": {
    "Browser": "130.0.6723.58",
    "Node": "v18.20.4"
  },
  "Dependencies": {
    "click": "8.1.7",
    "docutils": "0.21.2",
    "itsdangerous": "2.2.0",
    "jedi": "0.19.1",
    "markdown": "3.7",
    "narwhals": "1.13.2",
    "packaging": "24.1",
    "psutil": "6.1.0",
    "pygments": "2.18.0",
    "pymdown-extensions": "10.12",
    "pyyaml": "6.0.2",
    "ruff": "0.7.2",
    "starlette": "0.41.2",
    "tomlkit": "0.13.2",
    "typing-extensions": "4.12.2",
    "uvicorn": "0.32.0",
    "websockets": "12.0"
  },
  "Optional Dependencies": {
    "altair": "5.4.1",
    "duckdb": "1.1.3",
    "pandas": "2.2.3",
    "polars": "1.13.0",
    "pyarrow": "18.0.0"
  }
}

Code to reproduce

import polars as pl
from datetime import datetime

pl.DataFrame({
    "timestamp": [datetime(2010,10,7,13,15)]
})

Preview displays this as 2010-10-07T12:15:00.000Z. It should appear as 2010-10-07T13:15:00.000

Still occurs with 0.9.19

doesn't happen on 0.9.13, so #2799 seems like a likely candidate

Thanks for filing this, I am working on a fix