diff --git a/docs/advanced_usage.md b/docs/advanced_usage.md index 1d76b10d6..f565a3f57 100644 --- a/docs/advanced_usage.md +++ b/docs/advanced_usage.md @@ -517,6 +517,31 @@ existing tables) with: 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). + +### 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} Paperless is able to utilize barcodes for automatically performing some tasks.