Per-notebook time zone configuration in Jupyter kernels
0 reputation · 06 Oct 2021, 00:53 UTC
Per-notebook time zone configuration in Jupyter kernels
The goal is to ensure that date‑sensitive computations produce the same naive datetime values regardless of which regional server executes the notebook.
Currently, notebook metadata stores creation and modification timestamps as ISO 8601 strings (usually UTC), but kernels run in the host’s local time zone with no per‑notebook override; the only reliable way to change the kernel’s TZ is to set the environment variable before the kernel starts.
It is unclear whether a notebook can declare its intended time zone in a way that the kernel honors without modifying the kernel spec, or whether Jupyter Server could automatically inject that zone into the kernel environment based on notebook metadata.
- Can notebook metadata include a time‑zone field that kernels automatically respect?
- Is there a supported mechanism to override the kernel’s TZ on a per‑notebook basis without editing the kernel spec?
- Should the Jupyter Contents API or kernel launch process provide a way to inject a declared time zone into the kernel’s environment?