Skip to content

Commit

Permalink
timezone: pass through /etc/localtime so timezone is correct
Browse files Browse the repository at this point in the history
  • Loading branch information
ahayzen committed Aug 9, 2023
1 parent 6e4da01 commit 2d976e7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ PROJECT_FILES=(
"src/sandbox/pulseaudio.sh"
"src/sandbox/selinux.sh"
"src/sandbox/ssh.sh"
"src/sandbox/timezone.sh"
"src/sandbox/usb.sh"
"src/sandbox/user.sh"
"src/sandbox/wayland.sh"
Expand Down
2 changes: 2 additions & 0 deletions src/sandbox/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ function sandbox_setup() {
sandbox_setup_selinux
printf "\r(%s) Finding SSH ... " "$TAG_NAME"
sandbox_setup_ssh
printf "\r(%s) Finding timezone ..." "$TAG_NAME"
sandbox_setup_timezone
printf "\r(%s) Finding USB ... " "$TAG_NAME"
sandbox_setup_usb
printf "\r(%s) Finding User ... " "$TAG_NAME"
Expand Down
7 changes: 7 additions & 0 deletions src/sandbox/timezone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SPDX-FileCopyrightText: Andrew Hayzen <ahayzen@gmail.com>
#
# SPDX-License-Identifier: MPL-2.0

function sandbox_setup_timezone() {
CONTAINER_RUN_ARGS+=(--volume=/etc/localtime:/etc/localtime:ro)
}

0 comments on commit 2d976e7

Please sign in to comment.