Skip to content
Prev 59682 / 63433 Next

Sys.timezone() fails on Linux under Microsoft WSL

One way to avoid the call to timedatectl is to set the `TZ` environment
variable on your machine to your local timezone, if this is set
`Sys.timezone()` uses this and does not try to query timedatectl for the
timezone.

This is a common issue as well in docker containers, as like on WSL in
docker timedatectl is present, but non-functional.

Jim
On Tue, Apr 13, 2021 at 9:19 AM Brenton Wiernik <brenton at wiernik.org> wrote: