microsoft / microsoft/WSL

wsl overwrites /etc/timezone and /etc/localtime

Open
#12,820 4 comments 0 reactions 1 assignee View on GitHub

@craigloewen-msft is already working on this.

Since Apr 16, 2025.

documentation
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### Windows Version

Version 10.0.19045.5679

### WSL Version

2.4.13.0

### Are you using WSL 1 or WSL 2?

- [x] WSL 2
- [ ] WSL 1

### Kernel Version

5.15.167.4-1

### Distro Version

rockylinux 9

### Other Software

WSLg version: 1.0.65
MSRDC version: 1.2.5716
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release

### Repro Steps

```
ln -fs /usr/share/zoneinfo/UTC /etc/localtime
echo "Etc/UTC" > /etc/timezone
```

after a while those get overwritten. systemd is NOT running.

### Expected Behavior

don't overwrite my config changes.

### Actual Behavior

changes wsl timezone to match windows host.

### Diagnostic Logs

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.