From 25b85bf074070792e02b383c8ad5ef2ce8bb0608 Mon Sep 17 00:00:00 2001 From: Tatsuya Ishikawa <34103899+tatsuyai713@users.noreply.github.com> Date: Thu, 8 Jan 2026 14:55:40 +0900 Subject: [PATCH] Add timezone option to compose-env.sh --- compose-env.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/compose-env.sh b/compose-env.sh index 4dfc2bac..38766ff9 100755 --- a/compose-env.sh +++ b/compose-env.sh @@ -17,6 +17,7 @@ Options (same as start-container.sh): -u, --ubuntu Ubuntu version: 22.04 or 24.04 (default: 24.04) -r, --resolution Resolution in WIDTHxHEIGHT format (default: 1920x1080) -d, --dpi DPI setting (default: 96) + -t, --timezone Timezone (default: UTC, example: Asia/Tokyo) -s, --ssl SSL directory path for HTTPS (optional) --env-file Write KEY=VALUE pairs to the specified file instead of exports -h, --help Show this help @@ -24,6 +25,7 @@ Options (same as start-container.sh): Environment overrides: Resolution: RESOLUTION DPI: DPI + Timezone: TIMEZONE Ports: PORT_SSL_OVERRIDE, PORT_HTTP_OVERRIDE, PORT_TURN_OVERRIDE SSL: SSL_DIR Container: CONTAINER_NAME, CONTAINER_HOSTNAME @@ -40,6 +42,7 @@ GPU_NUMS="${GPU_NUMS:-}" UBUNTU_VERSION="${UBUNTU_VERSION:-24.04}" RESOLUTION="${RESOLUTION:-1920x1080}" DPI="${DPI:-96}" +TIMEZONE="${TIMEZONE:-UTC}" SSL_DIR="${SSL_DIR:-}" OUTPUT_MODE="export" ENV_FILE="" @@ -99,6 +102,14 @@ while [[ $# -gt 0 ]]; do DPI="${2}" shift 2 ;; + -t|--timezone) + if [ -z "${2:-}" ]; then + echo "Error: --timezone requires a value (e.g. Asia/Tokyo)" >&2 + exit 1 + fi + TIMEZONE="${2}" + shift 2 + ;; -s|--ssl) if [ -z "${2:-}" ]; then echo "Error: --ssl requires a directory path" >&2 @@ -249,7 +260,7 @@ ENV_VARS=( HOST_USER HOST_UID HOST_GID CONTAINER_NAME USER_IMAGE CONTAINER_HOSTNAME IMAGE_BASE IMAGE_TAG IMAGE_VERSION IMAGE_ARCH UBUNTU_VERSION HOST_PORT_SSL HOST_PORT_HTTP HOST_PORT_TURN HOST_IP - WIDTH HEIGHT DPI SHM_SIZE RESOLUTION + WIDTH HEIGHT DPI SHM_SIZE RESOLUTION TIMEZONE GPU_VENDOR GPU_ALL GPU_NUMS VIDEO_ENCODER SELKIES_ENCODER ENABLE_NVIDIA LIBVA_DRIVER_NAME NVIDIA_VISIBLE_DEVICES GPU_DEVICES