Skip to content

Commit dc71c5b

Browse files
🐛 Use host timezone by default (#359)
1 parent f1e1e8e commit dc71c5b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

paperless-ngx/config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ options:
3131
filename: "{{ created_year }}/{{ correspondent }}/{{ title }}"
3232
language: eng
3333
language_packages: eng deu fra ita spa
34-
timezone: UTC
3534
ssl: false
3635
certfile: fullchain.pem
3736
keyfile: privkey.pem
@@ -44,7 +43,7 @@ schema:
4443
filename: str
4544
language: str
4645
language_packages: str
47-
timezone: str
46+
timezone: str?
4847
polling_interval: int?
4948
barcodes_enabled: bool?
5049
barcodes_asn: bool?

paperless-ngx/rootfs/etc/s6-overlay/s6-rc.d/init-addon/run

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cd /usr/src/paperless/src/ || exit
1111
PAPERLESS_FILENAME_FORMAT=$(bashio::config 'filename')
1212
PAPERLESS_OCR_LANGUAGE=$(bashio::config 'language')
1313
PAPERLESS_OCR_LANGUAGES=$(bashio::config 'language_packages')
14-
PAPERLESS_TIME_ZONE=$(bashio::config 'timezone')
14+
PAPERLESS_TIME_ZONE=$(bashio::info.timezone)
1515
PAPERLESS_CONSUMER_ENABLE_BARCODES=$(bashio::config 'barcodes_enabled')
1616
PAPERLESS_CONSUMER_ENABLE_ASN_BARCODE=$(bashio::config 'barcodes_asn')
1717
PAPERLESS_CONSUMER_RECURSIVE=$(bashio::config 'consumer_recursive')
@@ -28,6 +28,11 @@ PAPERLESS_TIKA_ENDPOINT=http://ca5234a0-tika-gotenberg:9998
2828
PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://ca5234a0-tika-gotenberg:3000
2929
PAPERLESS_TIKA_ENABLED=$(bashio::config 'tika_gotenberg')
3030

31+
if bashio::config.has_value 'timezone'; then
32+
PAPERLESS_TIME_ZONE=$(bashio::config 'timezone')
33+
bashio::log.info "Timezone set to $PAPERLESS_TIME_ZONE"
34+
fi
35+
3136
if bashio::config.has_value 'usermap_uid'; then
3237
USERMAP_UID=$(bashio::config 'usermap_uid')
3338
echo -n "${USERMAP_UID}" > /var/run/s6/container_environment/USERMAP_UID

0 commit comments

Comments
 (0)