From fc145160c44b8aa07143bd9f30ad509d13938149 Mon Sep 17 00:00:00 2001 From: Martin Stone Date: Thu, 18 Feb 2021 11:48:32 +0000 Subject: [PATCH] Docs: date/time formats may need to be quoted in config files Closes #1007 --- khal.conf.sample | 2 ++ khal/settings/khal.spec | 3 +++ 2 files changed, 5 insertions(+) diff --git a/khal.conf.sample b/khal.conf.sample index 337d0e5b1..95110575a 100644 --- a/khal.conf.sample +++ b/khal.conf.sample @@ -15,6 +15,8 @@ path = ~/.khal/khal.db local_timezone = Europe/Berlin default_timezone = America/New_York +# If you use certain characters (e.g. commas) in these formats you may need to +# enclose them in "" to ensure that they are loaded as strings. timeformat = %H:%M dateformat = %d.%m. longdateformat = %d.%m.%Y diff --git a/khal/settings/khal.spec b/khal/settings/khal.spec index 1cf64aa9f..c09912a6f 100644 --- a/khal/settings/khal.spec +++ b/khal/settings/khal.spec @@ -98,6 +98,9 @@ local_timezone = timezone(default=None) # The formatting string is interpreted as defined by Python's `strftime # `_, which is # similar to the format specified in ``man strftime``. + +# In the configuration file it may be necessary to enclose the format in +# quotation marks to force it to be loaded as a string. timeformat = string(default='%X') # khal will display and understand all dates in this format, see :ref:`timeformat ` for the format