From cd336e8481e008f996d80c529816895e845a4cf2 Mon Sep 17 00:00:00 2001
From: Bruce Cowan <bruce@bcowan.eu>
Date: Fri, 12 Jan 2018 13:16:38 +0000
Subject: [PATCH] Set locale

---
 datetime.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/datetime.py b/datetime.py
index 435b3bc..22f7597 100644
--- a/datetime.py
+++ b/datetime.py
@@ -1,4 +1,4 @@
-# Copyright © 2016 Bruce Cowan <bruce@bcowan.eu>
+# Copyright © 2016-2018 Bruce Cowan <bruce@bcowan.eu>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,6 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from datetime import datetime
+import locale
 
 from errbot import BotPlugin, botcmd
 
@@ -21,6 +22,11 @@ from errbot import BotPlugin, botcmd
 class Datetime(BotPlugin):
     """Functions to do with dates and times"""
 
+    def activate(self):
+        super().activate()
+
+        locale.setlocale(locale.LC_TIME, '')
+
     @staticmethod
     def _get_date_time(fmt):
         dt = datetime.now()
-- 
GitLab