diff --git a/datetime.py b/datetime.py index 435b3bc7cf1744e25674de7e2d1629d4fd1052b3..22f75977430cfc74472e54b4b16c7c50543c3da3 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()