Add docs about missing timezones in MySQL/MariaDB

This commit is contained in:
Michael Wieland 2024-01-28 21:44:55 +01:00 committed by Michael Wieland
parent d0ce4113e0
commit b7e3565b04

View File

@ -517,6 +517,31 @@ existing tables) with:
an older system may fix issues that can arise while setting up Paperless-ngx but an older system may fix issues that can arise while setting up Paperless-ngx but
`utf8mb3` can cause issues with consumption (where `utf8mb4` does not). `utf8mb3` can cause issues with consumption (where `utf8mb4` does not).
### Missing timezones
Django uses timezones but MySQL as well as MariaDB do not have any timezone information by default.
This results in not being able to filter by date ranges (i.e. using after/before in the "Created" or "Added" filters).
To fix that, you have to add the timezone information into your database by using one of the following commands depending on whether you are using MySQL or MariaDB.
Note: In case you are using the official MariaDB docker image, this is already done while initializing the database.
To check whether an import of the timezone information is necessary, you can take a look into the `time_zone` table inside the `mysql` database. If this table is empty, you have to import the timezone information using the commands bellow.
MySQL (and older MariaDB installations):
```
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p
```
MariaDB:
```
mariadb-tzinfo-to-sql /usr/share/zoneinfo | mariadb -u root mysql -p
```
## Barcodes {#barcodes} ## Barcodes {#barcodes}
Paperless is able to utilize barcodes for automatically performing some tasks. Paperless is able to utilize barcodes for automatically performing some tasks.