`read_json` silently drops offset, unlike `read_csv`
Author: MarcoGorelliCreated Sep 11, 2026Updated Sep 16, 2026
LabelspythonA-temporalacceptedP-highA-io-json
Checks
- I have checked that this issue has not already been reported.
- I have confirmed this bug exists on the latest version of Polars.
Reproducible example
import polars as pl
import io
# I'd expect the following two to give different results...
print(pl.read_json(io.StringIO('[{"a": "2020-01-01T12:34+05:00"}]'), schema={'a': pl.Datetime}))
print(pl.read_json(io.StringIO('[{"a": "2020-01-01T12:34+06:00"}]'), schema={'a': pl.Datetime}))Log output
# but no, they give the same exact output
shape: (1, 1)
┌─────────────────────┐
│ a │
│ --- │
│ datetime[μs] │
╞═════════════════════╡
│ 2020-01-01 12:34:00 │
└─────────────────────┘
shape: (1, 1)
┌─────────────────────┐
│ a │
│ --- │
│ datetime[μs] │
╞═════════════════════╡
│ 2020-01-01 12:34:00 │
└─────────────────────┘Issue description
Different inputs shouldn't result in the same output, it's quite odd that the offset is just silently dropped
Shouldn't the result be converted to UTC, like how read_csv does?
>>> pl.read_csv(io.StringIO('a\n2020-01-01T12:34+05:00\n2020-01-01T12:34+06:00'), try_parse_dates=True)
Out[16]:
shape: (2, 1)
┌─────────────────────────┐
│ a │
│ --- │
│ datetime[μs, UTC] │
╞═════════════════════════╡
│ 2020-01-01 07:34:00 UTC │
│ 2020-01-01 06:34:00 UTC │
└─────────────────────────┘Expected behavior
I think
shape: (1, 1)
┌─────────────────────┐
│ a │
│ --- │
│ datetime[μs] │
╞═════════════════════╡
│ 2020-01-01 07:34:00 │
└─────────────────────┘
shape: (1, 1)
┌─────────────────────┐
│ a │
│ --- │
│ datetime[μs] │
╞═════════════════════╡
│ 2020-01-01 06:34:00 │
└─────────────────────┘Installed versions
--------Version info---------
Polars: 2.0.0-rc.1
Index type: UInt32
Platform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.39
Python: 3.14.4 (main, Apr 14 2026, 14:26:14) [Clang 22.1.3 ]
Runtime: rt32
----Optional dependencies----
Azure CLI <not installed>
adbc_driver_manager <not installed>
altair <not installed>
azure.identity <not installed>
boto3 <not installed>
cloudpickle <not installed>
connectorx <not installed>
deltalake <not installed>
fastexcel <not installed>
fsspec <not installed>
gevent <not installed>
google.auth <not installed>
great_tables <not installed>
matplotlib <not installed>
numpy 2.4.6
openpyxl <not installed>
pandas 3.0.3
polars_cloud <not installed>
pyarrow 24.0.0
pydantic 2.13.5
pyiceberg <not installed>
sqlalchemy <not installed>
torch <not installed>
xlsx2csv <not installed>
xlsxwriter <not installed>Source: pola-rs/polars