From 0881c1ce274c2093c6150a881cfdd5600cb48f4b Mon Sep 17 00:00:00 2001 From: Jigme Datse Yli-Rasku Date: Wed, 29 May 2024 22:49:41 -0700 Subject: [PATCH] Change date format, switch `$` to `%` This was a typing mistake. --- docs/courier-to-mailman3.md | 3 ++- source/courier-to-mailman3.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/courier-to-mailman3.md b/docs/courier-to-mailman3.md index e758ec8..2e8380b 100644 --- a/docs/courier-to-mailman3.md +++ b/docs/courier-to-mailman3.md @@ -24,4 +24,5 @@ This is our current version trying to communicate between courier and mailman3. * This sorts it, now let's get a date format working * Now let's see if this works... * Date format set: - * Level and File set in variable \ No newline at end of file + * Level and File set in variable + * Format had errors with `$` used instead of `%` \ No newline at end of file diff --git a/source/courier-to-mailman3.py b/source/courier-to-mailman3.py index 2ee44e7..06ff9de 100644 --- a/source/courier-to-mailman3.py +++ b/source/courier-to-mailman3.py @@ -17,7 +17,7 @@ logger = logging.getLogger(__name__) # Format time and message FORMAT = '%(asctime)s %(message)s' # Set Date Format -DATEFMT = '%Y-$m-$d %H:%M:%S %Z' +DATEFMT = '%Y-%m-%d %H:%M:%S %Z' LEVEL=logging.INFO LOGFILE='/opt/mailman/logs/courier-to-mailman.log' logging.basicConfig(filename=LOGFILE, level=LEVEL, format=FORMAT, datefmt=DATEFMT)