[Enhancement]: Add "tzdata" to Dockerfile #403

Closed
opened 2026-04-24 23:07:58 +02:00 by adam · 5 comments
Owner

Originally created by @plague-doctor on GitHub (Jun 1, 2022).

Describe the feature/enhancement

Please append tzdata to Dockerfile (line 10):

RUN apk update && apk add --no-cache --update ffmpeg tzdata

and optionally set the default timezone to UTC:

ENV TZ=UTC

This will allow us - non-UTC based users - to configure the timezone accordingly. This helps a lot to analyze the logs.

Originally created by @plague-doctor on GitHub (Jun 1, 2022). ### Describe the feature/enhancement Please append `tzdata` to Dockerfile (line 10): ``` RUN apk update && apk add --no-cache --update ffmpeg tzdata ``` and optionally set the default timezone to UTC: ``` ENV TZ=UTC ``` This will allow us - non-UTC based users - to configure the timezone accordingly. This helps a lot to analyze the logs.
adam added the enhancement label 2026-04-24 23:07:58 +02:00
adam closed this issue 2026-04-24 23:07:59 +02:00
Author
Owner

@plague-doctor commented on GitHub (Jun 1, 2022):

Also, regardless of whatever is actually set to TZ, the ABS log is ignoring that...
From console (Time in AEST - it is the right one):

/ $ env
TZ=Australia/Melbourne

/ $ date
Thu Jun  2 07:49:21 AEST 2022

logs (in UTC):

2022-06-01 21:47:07 DEBUG Set Log Level to DEBUG
2022-06-01 21:47:07 DEBUG [DB] Updated settings: 1
2022-06-01 21:47:14 DEBUG [Server] User Offline plague
2022-06-01 21:47:14 INFO [Server] Socket h532ovQGNlSgGkSBAAAH disconnected from client "plague" after 27174ms
2022-06-01 21:47:14 INFO [Server] Socket Connected RBOBJOipt-Wot8gAAAAJ
2022-06-01 21:47:14 DEBUG [Server] User Online plague
2022-06-01 21:47:24 ERROR [DB] Update entity user Failed: Error: Lock file is already being held
2022-06-01 21:50:29 WARN [ApiRouter] Library item not found for users progress 
@plague-doctor commented on GitHub (Jun 1, 2022): Also, regardless of whatever is actually set to TZ, the ABS log is ignoring that... From console (Time in AEST - it is the right one): ``` / $ env TZ=Australia/Melbourne / $ date Thu Jun 2 07:49:21 AEST 2022 ``` logs (in UTC): ``` 2022-06-01 21:47:07 DEBUG Set Log Level to DEBUG 2022-06-01 21:47:07 DEBUG [DB] Updated settings: 1 2022-06-01 21:47:14 DEBUG [Server] User Offline plague 2022-06-01 21:47:14 INFO [Server] Socket h532ovQGNlSgGkSBAAAH disconnected from client "plague" after 27174ms 2022-06-01 21:47:14 INFO [Server] Socket Connected RBOBJOipt-Wot8gAAAAJ 2022-06-01 21:47:14 DEBUG [Server] User Online plague 2022-06-01 21:47:24 ERROR [DB] Update entity user Failed: Error: Lock file is already being held 2022-06-01 21:50:29 WARN [ApiRouter] Library item not found for users progress ```
Author
Owner

@advplyr commented on GitHub (Jun 2, 2022):

Yeah that all needs to be coded in to handle the TZ environment variable

@advplyr commented on GitHub (Jun 2, 2022): Yeah that all needs to be coded in to handle the TZ environment variable
Author
Owner

@hskrtich commented on GitHub (Jun 3, 2022):

https://github.com/advplyr/audiobookshelf/pull/664 Add's the tzdata package to the docker file. So this work is partly done.

@hskrtich commented on GitHub (Jun 3, 2022): https://github.com/advplyr/audiobookshelf/pull/664 Add's the tzdata package to the docker file. So this work is partly done.
Author
Owner

@advplyr commented on GitHub (Jun 19, 2022):

tzdata should work and in 2.0.22 the logger will use the timezone for timestamps instead of UTC

@advplyr commented on GitHub (Jun 19, 2022): tzdata should work and in [2.0.22](https://github.com/advplyr/audiobookshelf/releases/tag/v2.0.22) the logger will use the timezone for timestamps instead of UTC
Author
Owner

@neingeist commented on GitHub (Sep 15, 2022):

For anyone coming over here via Google: Setting TZ works for the container, e.g. in docker-compose.yml:

   [...]
    environment:
      - TZ=Europe/Berlin
   [...]
@neingeist commented on GitHub (Sep 15, 2022): For anyone coming over here via Google: Setting `TZ` works for the container, e.g. in `docker-compose.yml`: ``` [...] environment: - TZ=Europe/Berlin [...] ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#403