Skip to content

DOCKER_CRYPT_TZ is ignored by settings_import.py #158

Description

@machinas-achim

The documented DOCKER_CRYPT_TZ configuration does not work in the current macadmins/crypt-server:3.4.2 image.

docker/nginx/nginx-env.conf explicitly forwards:

env DOCKER_CRYPT_TZ;

However, the deployed container's /home/docker/crypt/fvserver/settings_import.py reads only TZ when setting Django TIME_ZONE; it never checks DOCKER_CRYPT_TZ.

Reproduction

  1. Set only:

DOCKER_CRYPT_TZ=Europe/Madrid

  1. Start or redeploy the container.

  2. Inspect the application setting:

python3 -c '
import os, pytz
from fvserver import settings_import
print(os.environ.get("TZ"))
print(os.environ.get("DOCKER_CRYPT_TZ"))
print(settings_import.TIME_ZONE)
print(pytz.timezone(settings_import.TIME_ZONE).zone)
'

Actual result

The image supplies TZ=Etc/UTC. DOCKER_CRYPT_TZ=Europe/Madrid is present but ignored. Both settings_import.TIME_ZONE and pytz resolve to Etc/UTC.

Expected result

DOCKER_CRYPT_TZ should take precedence over TZ, consistent with nginx-env.conf and the documented image environment contract.

Requested fix

Either:

  1. Restore DOCKER_CRYPT_TZ support in settings_import.py, preferring it before TZ; or
  2. Remove DOCKER_CRYPT_TZ from nginx/image documentation and explicitly state that operators must use TZ.

This is related to the timezone support corrected by PR #107 / issue #108.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions