aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Jonglez <git@bitsofnetworks.org>2020-04-26 17:10:54 +0200
committerGlandos <bugs-github@antipoul.fr>2020-11-13 21:40:39 +0100
commit384d3eeb2c78fe61b64c762efbb5e131949ef812 (patch)
treebf3493719ebb9eecb304fa3600c922eb09df9460
parent914482bc76954aef067ac73314a19f415a32c61c (diff)
downloadihatemoney-mirror-384d3eeb2c78fe61b64c762efbb5e131949ef812.zip
ihatemoney-mirror-384d3eeb2c78fe61b64c762efbb5e131949ef812.tar.gz
ihatemoney-mirror-384d3eeb2c78fe61b64c762efbb5e131949ef812.tar.bz2
Document timezone settings
-rw-r--r--docs/configuration.rst22
-rw-r--r--ihatemoney/conf-templates/ihatemoney.cfg.j24
2 files changed, 25 insertions, 1 deletions
diff --git a/docs/configuration.rst b/docs/configuration.rst
index 5b78707..7e29da1 100644
--- a/docs/configuration.rst
+++ b/docs/configuration.rst
@@ -31,6 +31,7 @@ connection string. This will look like::
SQLALCHEMY_DATABASE_URI = 'postgresql://myuser:mypass@localhost/dbname?client_encoding=utf8'
+.. _the SQLAlchemy documentation: http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls
`SECRET_KEY`
------------
@@ -96,7 +97,26 @@ if set to ``"somestring"``, it will be served from a "folder"
- **Default value:** ``""`` (empty string)
-.. _the SQLAlchemy documentation: http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls
+`BABEL_DEFAULT_TIMEZONE`
+------------------------
+
+The timezone that will be used to convert date and time when displaying them
+to the user (all times are always stored in UTC internally).
+If not set, it will default to the timezone configured on the Operating System
+of the server running ihatemoney, which may or may not be what you want.
+
+- **Default value:** *unset* (use the timezone of the server Operating System)
+- **Production value:** Set to the timezone of your expected users, with a
+ format such as ``"Europe/Paris"``. See `this list of TZ database names`_
+ for a complete list.
+
+Note: this setting is actually interpreted by Flask-Babel, see the
+`Flask-Babel guide for formatting dates`_ for details.
+
+.. _this list of TZ database name: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
+
+.. _Flask-Babel guide for formatting dates: https://pythonhosted.org/Flask-Babel/#formatting-dates
+
Configuring emails sending
--------------------------
diff --git a/ihatemoney/conf-templates/ihatemoney.cfg.j2 b/ihatemoney/conf-templates/ihatemoney.cfg.j2
index c054591..0188c6b 100644
--- a/ihatemoney/conf-templates/ihatemoney.cfg.j2
+++ b/ihatemoney/conf-templates/ihatemoney.cfg.j2
@@ -34,3 +34,7 @@ ALLOW_PUBLIC_PROJECT_CREATION = True
# If set to True, an administration dashboard is available.
ACTIVATE_ADMIN_DASHBOARD = False
+
+# You can change the timezone used to display time. By default it will be
+#derived from the server OS.
+#BABEL_DEFAULT_TIMEZONE = "Europe/Paris"