Skip to content

searchd fails to initialize time zone from TZ environment variable #116

@sabnak

Description

@sabnak

Bug Description:

When running the Manticore Docker container (manticoresearch/manticore:10.1.0) with TZ=Europe/Moscow set, the system time inside the container is correct (MSK, GMT+3), but searchd fails to initialize the time zone and falls back to UTC.

Steps to Reproduce:

  1. Run container with environment variable:
    docker-compose.yml
...
environment:
  - TZ=Europe/Moscow
...
  1. Confirm system time is correct
    docker exec -it manticore date
    Output:
Mon Jul  7 11:47:34 MSK 2025
  1. Verify timezone file exists:

docker exec -it manticore ls -l /usr/share/zoneinfo/Europe/Moscow
Output:

-rw-r--r-- 1 root root 1535 Apr 22 13:11 /usr/share/zoneinfo/Europe/Moscow
  1. Check searchd logs:

/var/log/manticore/searchd.log
Output:

[Mon Jul  7 08:36:22.023 2025] [1] WARNING: Error initializing time zones: Error resolving local time zone from TZ='Europe/Moscow' and time zone dir '/usr/share/zoneinfo/'
[Mon Jul  7 08:36:22.023 2025] [1] Using local time zone 'UTC'

docker log manticore
Output:

[Mon Jul  7 08:36:22.022 2025] [1] Using time zone 'Europe/Moscow'

stdout logs are different from the logs on the disk? Anyway, time still incorrect.

Expected Behavior:

searchd should successfully initialize with the Europe/Moscow time zone (GMT+3) as specified by the TZ environment variable.

Actual Behavior:

searchd fails to resolve the time zone despite:

  • Correct TZ environment variable (Europe/Moscow)
  • Valid timezone file present (/usr/share/zoneinfo/Europe/Moscow)
  • Correct system time (confirmed by date command)
  • Proper file permissions (644 root:root)

Environment:

  • Manticore Image: manticoresearch/manticore:10.1.0
  • Host OS: Debian Linux 6.1.0-37-amd64
  • Docker Version: 28.3.0 (build 38b7060)

Reproduction Rate: 100%

Docker image version:

manticoresearch/manticore:10.1.0

Have you tried the latest development version?

No

Internal Checklist:

To be completed by the assignee. Check off tasks that have been completed or are not applicable.

  • Implementation completed
  • Tests developed
  • Documentation updated
  • Documentation reviewed
  • Changelog updated

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions