lablup / lablup/backend.ai

Using environment variables to replace existing Timezone settings

Open
#3,589 0 comments 0 reactions 0 assignees View on GitHub
type:enhance
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

### Main idea

Currently, timezone information can only pass on the specific Linux distributions (Ubuntu/Debian-like Linux) using /etc/timezone file. (It only located on the specific Linux distributions (Ubuntu/Debian-like Linux) )

The below link is to the code that is only applicable on the specific Linux distributions (Ubuntu/Debian-like Linux).
https://github.com/lablup/backend.ai/blob/main/src/ai/backend/agent/docker/agent.py#L386-L407

In my opinion, using the tzlocal package's get_localzone() function, can pass timezone environments not only for Ubuntu/Debian Linux Distributions but also, for RHEL-like(CentOS, Fedora, etc), and SUSE(also, include opensuse distribution) as well as for MacOS, Windows.

example python code
```python
from tzlocal import get_localzone
print(get_localzone()) # Asia/Seoul
```

### Alternative ideas

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.