budtmo / budtmo/docker-android

[🚀 Feature Request ]: How to switch timezones on the fly

Open
#503 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
15.8k
Forks
1.8k
Avg merge
12h 13m
Merged PRs (30d)
6

Description

### Idea

I know, this fit neither "feature request" nor "bug", but no other template matches. Sorry about that.

We would like to run multiple test suites after another that requires different timezones.
It seems that cleanly changing the emulator timezone requires to recreate the whole container.

**What we tried**

- Start a container without immediately starting the supervisor processes:
```bash
docker run --rm -it -e TZ=Europe/Berlin -e EMULATOR_DEVICE="Samsung Galaxy S10" -e WEB_VNC=true --device /dev/kvm -p 0.0.0.0:6081:6080 --entrypoint /bin/sh budtmo2/docker-android-pro:emulator_13.0_v2.11.1-p0 -c "trap \"exit\" TERM; while true; do sleep 1; done"
```
- Inside the container, trigger the original ENTRYPOINT script after changing EMULATOR_ADDITIONAL_ARGS to our timezone needs.
```bash
EMULATOR_ADDITIONAL_ARGS='-timezone Europe/Kyiv' /home/androidusr/docker-android/mixins/scripts/run.sh
```
This _does_ change the timezone - as in "it's not Europe/Berlin anymore 😆". It seems to be UTC for some reason.

Anyway, when stopping the ENTRYPOINT script, some zombie processes are left.

### Probelm to solve

Is there a clean way to switch timezones - without recreating the container? Hope, this is not as confusing as I feel right now. 🙂

### Additional Note

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.