We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remind is case sensitive
[22:20] <Eyore> .in 3SEC stuff
[22:20] @Willie Eyore: Sorry, didn't understand the input.
[22:20] <Eyore> .in 3 SEC stuff
[22:20] @Willie Eyore: Sorry, didn't understand the input.
[22:20] <Eyore> .in 3 S stuff
[22:20] @Willie Eyore: Sorry, didn't understand the input.
[22:20] <Eyore> .in 3 MIN stuff
[22:20] @Willie Eyore: Sorry, didn't understand the input.
[22:20] <Eyore> .in 3 Min stuff
[22:20] @Willie Eyore: Sorry, didn't understand the input.

I'd fix it myself, but looking at the code, I'm not sure where to put the .lower()


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `willie/modules/remind.py`
Content:
```
1 # coding=utf8
2 """
3 remind.py - Willie Reminder Module
4 Copyright 2011, Sean B. Palmer, inamidst.com
5 Licensed under the Eiffel Forum License 2.
6 
7 http://willie.dftba.net
8 """
9 from __future__ import unicode_literals
10 
11 import os
12 import re
13 import time
14 import threading
15 import collections
16 import codecs
17 from datetime import datetime
18 from willie.module import commands, example, NOLIMIT
19 import willie.tools
20 
21 try:
22     import pytz
23 except:
24     pytz = None
25 
26 def filename(self):
27     name = self.nick + '-' + self.config.host + '.reminders.db'
28     return os.path.join(self.config.dotdir, name)
29 
30 
31 def load_database(name):
32     data = {}
33     if os.path.isfile(name):
34         f = codecs.open(name, 'r', encoding='utf-8')
35         for line in f:
36             unixtime, channel, nick, message = line.split('\t')
37             message = message.rstrip('\n')
38             t = int(float(unixtime))  # WTFs going on here?
39             reminder = (channel, nick, message)
40             try:
41                 data[t].append(reminder)
42             except KeyError:
43                 data[t] = [reminder]
44         f.close()
45     return data
46 
47 
48 def dump_database(name, data):
49     f = codecs.open(name, 'w', encoding='utf-8')
50     for unixtime, reminders in willie.tools.iteritems(data):
51         for channel, nick, message in reminders:
52             f.write('%s\t%s\t%s\t%s\n' % (unixtime, channel, nick, message))
53     f.close()
54 
55 
56 def setup(bot):
57     bot.rfn = filename(bot)
58     bot.rdb = load_database(bot.rfn)
59 
60     def monitor(bot):
61         time.sleep(5)
62         while True:
63             now = int(time.time())
64             unixtimes = [int(key) for key in bot.rdb]
65             oldtimes = [t for t in unixtimes if t <= now]
66             if oldtimes:
67                 for oldtime in oldtimes:
68                     for (channel, nick, message) in bot.rdb[oldtime]:
69                         if message:
70                             bot.msg(channel, nick + ': ' + message)
71                         else:
72                             bot.msg(channel, nick + '!')
73                     del bot.rdb[oldtime]
74                 dump_database(bot.rfn, bot.rdb)
75             time.sleep(2.5)
76 
77     targs = (bot,)
78     t = threading.Thread(target=monitor, args=targs)
79     t.start()
80 
81 scaling = collections.OrderedDict([
82     ('years', 365.25 * 24 * 3600),
83     ('year', 365.25 * 24 * 3600),
84     ('yrs', 365.25 * 24 * 3600),
85     ('y', 365.25 * 24 * 3600),
86 
87     ('months', 29.53059 * 24 * 3600),
88     ('month', 29.53059 * 24 * 3600),
89     ('mo', 29.53059 * 24 * 3600),
90 
91     ('weeks', 7 * 24 * 3600),
92     ('week', 7 * 24 * 3600),
93     ('wks', 7 * 24 * 3600),
94     ('wk', 7 * 24 * 3600),
95     ('w', 7 * 24 * 3600),
96 
97     ('days', 24 * 3600),
98     ('day', 24 * 3600),
99     ('d', 24 * 3600),
100 
101     ('hours', 3600),
102     ('hour', 3600),
103     ('hrs', 3600),
104     ('hr', 3600),
105     ('h', 3600),
106 
107     ('minutes', 60),
108     ('minute', 60),
109     ('mins', 60),
110     ('min', 60),
111     ('m', 60),
112 
113     ('seconds', 1),
114     ('second', 1),
115     ('secs', 1),
116     ('sec', 1),
117     ('s', 1),
118 ])
119 
120 periods = '|'.join(scaling.keys())
121 
122 
123 @commands('in')
124 @example('.in 3h45m Go to class')
125 def remind(bot, trigger):
126     """Gives you a reminder in the given amount of time."""
127     duration = 0
128     message = filter(None, re.split('(\d+(?:\.\d+)? ?(?:' + periods + ')) ?',
129                                     trigger.group(2))[1:])
130     reminder = ''
131     stop = False
132     for piece in message:
133         grp = re.match('(\d+(?:\.\d+)?) ?(.*) ?', piece)
134         if grp and not stop:
135             length = float(grp.group(1))
136             factor = scaling.get(grp.group(2), 60)
137             duration += length * factor
138         else:
139             reminder = reminder + piece
140             stop = True
141     if duration == 0:
142         return bot.reply("Sorry, didn't understand the input.")
143 
144     if duration % 1:
145         duration = int(duration) + 1
146     else:
147         duration = int(duration)
148     timezone = willie.tools.get_timezone(
149         bot.db, bot.config, None, trigger.nick, trigger.sender)
150     create_reminder(bot, trigger, duration, reminder, timezone)
151 
152 
153 @commands('at')
154 @example('.at 13:47 Do your homework!')
155 def at(bot, trigger):
156     """
157     Gives you a reminder at the given time. Takes hh:mm:ssTimezone
158     message. Timezone is any timezone Willie takes elsewhere; the best choices
159     are those from the tzdb; a list of valid options is available at
160     http://dft.ba/-tz . The seconds and timezone are optional.
161     """
162     regex = re.compile(r'(\d+):(\d+)(?::(\d+))?([^\s\d]+)? (.*)')
163     match = regex.match(trigger.group(2))
164     if not match:
165         bot.reply("Sorry, but I didn't understand your input.")
166         return NOLIMIT
167     hour, minute, second, tz, message = match.groups()
168     if not second:
169         second = '0'
170 
171     if pytz:
172         timezone = willie.tools.get_timezone(bot.db, bot.config, tz,
173                                              trigger.nick, trigger.sender)
174         if not timezone:
175             timezone = 'UTC'
176         now = datetime.now(pytz.timezone(timezone))
177         at_time = datetime(now.year, now.month, now.day,
178                            int(hour), int(minute), int(second),
179                            tzinfo=now.tzinfo)
180         timediff = at_time - now
181     else:
182         if tz and tz.upper() != 'UTC':
183             bot.reply("I don't have timzeone support installed.")
184             return NOLIMIT
185         now = datetime.now()
186         at_time = datetime(now.year, now.month, now.day,
187                            int(hour), int(minute), int(second))
188         timediff = at_time - now
189 
190     duration = timediff.seconds
191 
192     if duration < 0:
193         duration += 86400
194     create_reminder(bot, trigger, duration, message, 'UTC')
195 
196 
197 def create_reminder(bot, trigger, duration, message, tz):
198     t = int(time.time()) + duration
199     reminder = (trigger.sender, trigger.nick, message)
200     try:
201         bot.rdb[t].append(reminder)
202     except KeyError:
203         bot.rdb[t] = [reminder]
204 
205     dump_database(bot.rfn, bot.rdb)
206 
207     if duration >= 60:
208         remind_at = datetime.utcfromtimestamp(t)
209         timef = willie.tools.format_time(bot.db, bot.config, tz, trigger.nick,
210                                          trigger.sender, remind_at)
211 
212         bot.reply('Okay, will remind at %s' % timef)
213     else:
214         bot.reply('Okay, will remind in %s secs' % duration)
215
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/willie/modules/remind.py b/willie/modules/remind.py
--- a/willie/modules/remind.py
+++ b/willie/modules/remind.py
@@ -125,7 +125,7 @@
 def remind(bot, trigger):
     """Gives you a reminder in the given amount of time."""
     duration = 0
-    message = filter(None, re.split('(\d+(?:\.\d+)? ?(?:' + periods + ')) ?',
+    message = filter(None, re.split('(\d+(?:\.\d+)? ?(?:(?i)' + periods + ')) ?',
                                     trigger.group(2))[1:])
     reminder = ''
     stop = False
@@ -133,7 +133,7 @@
         grp = re.match('(\d+(?:\.\d+)?) ?(.*) ?', piece)
         if grp and not stop:
             length = float(grp.group(1))
-            factor = scaling.get(grp.group(2), 60)
+            factor = scaling.get(grp.group(2).lower(), 60)
             duration += length * factor
         else:
             reminder = reminder + piece

{"golden_diff": "diff --git a/willie/modules/remind.py b/willie/modules/remind.py\n--- a/willie/modules/remind.py\n+++ b/willie/modules/remind.py\n@@ -125,7 +125,7 @@\n def remind(bot, trigger):\n     \"\"\"Gives you a reminder in the given amount of time.\"\"\"\n     duration = 0\n-    message = filter(None, re.split('(\\d+(?:\\.\\d+)? ?(?:' + periods + ')) ?',\n+    message = filter(None, re.split('(\\d+(?:\\.\\d+)? ?(?:(?i)' + periods + ')) ?',\n                                     trigger.group(2))[1:])\n     reminder = ''\n     stop = False\n@@ -133,7 +133,7 @@\n         grp = re.match('(\\d+(?:\\.\\d+)?) ?(.*) ?', piece)\n         if grp and not stop:\n             length = float(grp.group(1))\n-            factor = scaling.get(grp.group(2), 60)\n+            factor = scaling.get(grp.group(2).lower(), 60)\n             duration += length * factor\n         else:\n             reminder = reminder + piece\n", "issue": "Remind is case sensitive\n[22:20] <Eyore> .in 3SEC stuff\n[22:20] @Willie Eyore: Sorry, didn't understand the input.\n[22:20] <Eyore> .in 3 SEC stuff\n[22:20] @Willie Eyore: Sorry, didn't understand the input.\n[22:20] <Eyore> .in 3 S stuff\n[22:20] @Willie Eyore: Sorry, didn't understand the input.\n[22:20] <Eyore> .in 3 MIN stuff\n[22:20] @Willie Eyore: Sorry, didn't understand the input.\n[22:20] <Eyore> .in 3 Min stuff\n[22:20] @Willie Eyore: Sorry, didn't understand the input.\n\nI'd fix it myself, but looking at the code, I'm not sure where to put the .lower()\n\n", "before_files": [{"content": "# coding=utf8\n\"\"\"\nremind.py - Willie Reminder Module\nCopyright 2011, Sean B. Palmer, inamidst.com\nLicensed under the Eiffel Forum License 2.\n\nhttp://willie.dftba.net\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport os\nimport re\nimport time\nimport threading\nimport collections\nimport codecs\nfrom datetime import datetime\nfrom willie.module import commands, example, NOLIMIT\nimport willie.tools\n\ntry:\n    import pytz\nexcept:\n    pytz = None\n\ndef filename(self):\n    name = self.nick + '-' + self.config.host + '.reminders.db'\n    return os.path.join(self.config.dotdir, name)\n\n\ndef load_database(name):\n    data = {}\n    if os.path.isfile(name):\n        f = codecs.open(name, 'r', encoding='utf-8')\n        for line in f:\n            unixtime, channel, nick, message = line.split('\\t')\n            message = message.rstrip('\\n')\n            t = int(float(unixtime))  # WTFs going on here?\n            reminder = (channel, nick, message)\n            try:\n                data[t].append(reminder)\n            except KeyError:\n                data[t] = [reminder]\n        f.close()\n    return data\n\n\ndef dump_database(name, data):\n    f = codecs.open(name, 'w', encoding='utf-8')\n    for unixtime, reminders in willie.tools.iteritems(data):\n        for channel, nick, message in reminders:\n            f.write('%s\\t%s\\t%s\\t%s\\n' % (unixtime, channel, nick, message))\n    f.close()\n\n\ndef setup(bot):\n    bot.rfn = filename(bot)\n    bot.rdb = load_database(bot.rfn)\n\n    def monitor(bot):\n        time.sleep(5)\n        while True:\n            now = int(time.time())\n            unixtimes = [int(key) for key in bot.rdb]\n            oldtimes = [t for t in unixtimes if t <= now]\n            if oldtimes:\n                for oldtime in oldtimes:\n                    for (channel, nick, message) in bot.rdb[oldtime]:\n                        if message:\n                            bot.msg(channel, nick + ': ' + message)\n                        else:\n                            bot.msg(channel, nick + '!')\n                    del bot.rdb[oldtime]\n                dump_database(bot.rfn, bot.rdb)\n            time.sleep(2.5)\n\n    targs = (bot,)\n    t = threading.Thread(target=monitor, args=targs)\n    t.start()\n\nscaling = collections.OrderedDict([\n    ('years', 365.25 * 24 * 3600),\n    ('year', 365.25 * 24 * 3600),\n    ('yrs', 365.25 * 24 * 3600),\n    ('y', 365.25 * 24 * 3600),\n\n    ('months', 29.53059 * 24 * 3600),\n    ('month', 29.53059 * 24 * 3600),\n    ('mo', 29.53059 * 24 * 3600),\n\n    ('weeks', 7 * 24 * 3600),\n    ('week', 7 * 24 * 3600),\n    ('wks', 7 * 24 * 3600),\n    ('wk', 7 * 24 * 3600),\n    ('w', 7 * 24 * 3600),\n\n    ('days', 24 * 3600),\n    ('day', 24 * 3600),\n    ('d', 24 * 3600),\n\n    ('hours', 3600),\n    ('hour', 3600),\n    ('hrs', 3600),\n    ('hr', 3600),\n    ('h', 3600),\n\n    ('minutes', 60),\n    ('minute', 60),\n    ('mins', 60),\n    ('min', 60),\n    ('m', 60),\n\n    ('seconds', 1),\n    ('second', 1),\n    ('secs', 1),\n    ('sec', 1),\n    ('s', 1),\n])\n\nperiods = '|'.join(scaling.keys())\n\n\n@commands('in')\n@example('.in 3h45m Go to class')\ndef remind(bot, trigger):\n    \"\"\"Gives you a reminder in the given amount of time.\"\"\"\n    duration = 0\n    message = filter(None, re.split('(\\d+(?:\\.\\d+)? ?(?:' + periods + ')) ?',\n                                    trigger.group(2))[1:])\n    reminder = ''\n    stop = False\n    for piece in message:\n        grp = re.match('(\\d+(?:\\.\\d+)?) ?(.*) ?', piece)\n        if grp and not stop:\n            length = float(grp.group(1))\n            factor = scaling.get(grp.group(2), 60)\n            duration += length * factor\n        else:\n            reminder = reminder + piece\n            stop = True\n    if duration == 0:\n        return bot.reply(\"Sorry, didn't understand the input.\")\n\n    if duration % 1:\n        duration = int(duration) + 1\n    else:\n        duration = int(duration)\n    timezone = willie.tools.get_timezone(\n        bot.db, bot.config, None, trigger.nick, trigger.sender)\n    create_reminder(bot, trigger, duration, reminder, timezone)\n\n\n@commands('at')\n@example('.at 13:47 Do your homework!')\ndef at(bot, trigger):\n    \"\"\"\n    Gives you a reminder at the given time. Takes hh:mm:ssTimezone\n    message. Timezone is any timezone Willie takes elsewhere; the best choices\n    are those from the tzdb; a list of valid options is available at\n    http://dft.ba/-tz . The seconds and timezone are optional.\n    \"\"\"\n    regex = re.compile(r'(\\d+):(\\d+)(?::(\\d+))?([^\\s\\d]+)? (.*)')\n    match = regex.match(trigger.group(2))\n    if not match:\n        bot.reply(\"Sorry, but I didn't understand your input.\")\n        return NOLIMIT\n    hour, minute, second, tz, message = match.groups()\n    if not second:\n        second = '0'\n\n    if pytz:\n        timezone = willie.tools.get_timezone(bot.db, bot.config, tz,\n                                             trigger.nick, trigger.sender)\n        if not timezone:\n            timezone = 'UTC'\n        now = datetime.now(pytz.timezone(timezone))\n        at_time = datetime(now.year, now.month, now.day,\n                           int(hour), int(minute), int(second),\n                           tzinfo=now.tzinfo)\n        timediff = at_time - now\n    else:\n        if tz and tz.upper() != 'UTC':\n            bot.reply(\"I don't have timzeone support installed.\")\n            return NOLIMIT\n        now = datetime.now()\n        at_time = datetime(now.year, now.month, now.day,\n                           int(hour), int(minute), int(second))\n        timediff = at_time - now\n\n    duration = timediff.seconds\n\n    if duration < 0:\n        duration += 86400\n    create_reminder(bot, trigger, duration, message, 'UTC')\n\n\ndef create_reminder(bot, trigger, duration, message, tz):\n    t = int(time.time()) + duration\n    reminder = (trigger.sender, trigger.nick, message)\n    try:\n        bot.rdb[t].append(reminder)\n    except KeyError:\n        bot.rdb[t] = [reminder]\n\n    dump_database(bot.rfn, bot.rdb)\n\n    if duration >= 60:\n        remind_at = datetime.utcfromtimestamp(t)\n        timef = willie.tools.format_time(bot.db, bot.config, tz, trigger.nick,\n                                         trigger.sender, remind_at)\n\n        bot.reply('Okay, will remind at %s' % timef)\n    else:\n        bot.reply('Okay, will remind in %s secs' % duration)\n", "path": "willie/modules/remind.py"}], "after_files": [{"content": "# coding=utf8\n\"\"\"\nremind.py - Willie Reminder Module\nCopyright 2011, Sean B. Palmer, inamidst.com\nLicensed under the Eiffel Forum License 2.\n\nhttp://willie.dftba.net\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport os\nimport re\nimport time\nimport threading\nimport collections\nimport codecs\nfrom datetime import datetime\nfrom willie.module import commands, example, NOLIMIT\nimport willie.tools\n\ntry:\n    import pytz\nexcept:\n    pytz = None\n\ndef filename(self):\n    name = self.nick + '-' + self.config.host + '.reminders.db'\n    return os.path.join(self.config.dotdir, name)\n\n\ndef load_database(name):\n    data = {}\n    if os.path.isfile(name):\n        f = codecs.open(name, 'r', encoding='utf-8')\n        for line in f:\n            unixtime, channel, nick, message = line.split('\\t')\n            message = message.rstrip('\\n')\n            t = int(float(unixtime))  # WTFs going on here?\n            reminder = (channel, nick, message)\n            try:\n                data[t].append(reminder)\n            except KeyError:\n                data[t] = [reminder]\n        f.close()\n    return data\n\n\ndef dump_database(name, data):\n    f = codecs.open(name, 'w', encoding='utf-8')\n    for unixtime, reminders in willie.tools.iteritems(data):\n        for channel, nick, message in reminders:\n            f.write('%s\\t%s\\t%s\\t%s\\n' % (unixtime, channel, nick, message))\n    f.close()\n\n\ndef setup(bot):\n    bot.rfn = filename(bot)\n    bot.rdb = load_database(bot.rfn)\n\n    def monitor(bot):\n        time.sleep(5)\n        while True:\n            now = int(time.time())\n            unixtimes = [int(key) for key in bot.rdb]\n            oldtimes = [t for t in unixtimes if t <= now]\n            if oldtimes:\n                for oldtime in oldtimes:\n                    for (channel, nick, message) in bot.rdb[oldtime]:\n                        if message:\n                            bot.msg(channel, nick + ': ' + message)\n                        else:\n                            bot.msg(channel, nick + '!')\n                    del bot.rdb[oldtime]\n                dump_database(bot.rfn, bot.rdb)\n            time.sleep(2.5)\n\n    targs = (bot,)\n    t = threading.Thread(target=monitor, args=targs)\n    t.start()\n\nscaling = collections.OrderedDict([\n    ('years', 365.25 * 24 * 3600),\n    ('year', 365.25 * 24 * 3600),\n    ('yrs', 365.25 * 24 * 3600),\n    ('y', 365.25 * 24 * 3600),\n\n    ('months', 29.53059 * 24 * 3600),\n    ('month', 29.53059 * 24 * 3600),\n    ('mo', 29.53059 * 24 * 3600),\n\n    ('weeks', 7 * 24 * 3600),\n    ('week', 7 * 24 * 3600),\n    ('wks', 7 * 24 * 3600),\n    ('wk', 7 * 24 * 3600),\n    ('w', 7 * 24 * 3600),\n\n    ('days', 24 * 3600),\n    ('day', 24 * 3600),\n    ('d', 24 * 3600),\n\n    ('hours', 3600),\n    ('hour', 3600),\n    ('hrs', 3600),\n    ('hr', 3600),\n    ('h', 3600),\n\n    ('minutes', 60),\n    ('minute', 60),\n    ('mins', 60),\n    ('min', 60),\n    ('m', 60),\n\n    ('seconds', 1),\n    ('second', 1),\n    ('secs', 1),\n    ('sec', 1),\n    ('s', 1),\n])\n\nperiods = '|'.join(scaling.keys())\n\n\n@commands('in')\n@example('.in 3h45m Go to class')\ndef remind(bot, trigger):\n    \"\"\"Gives you a reminder in the given amount of time.\"\"\"\n    duration = 0\n    message = filter(None, re.split('(\\d+(?:\\.\\d+)? ?(?:(?i)' + periods + ')) ?',\n                                    trigger.group(2))[1:])\n    reminder = ''\n    stop = False\n    for piece in message:\n        grp = re.match('(\\d+(?:\\.\\d+)?) ?(.*) ?', piece)\n        if grp and not stop:\n            length = float(grp.group(1))\n            factor = scaling.get(grp.group(2).lower(), 60)\n            duration += length * factor\n        else:\n            reminder = reminder + piece\n            stop = True\n    if duration == 0:\n        return bot.reply(\"Sorry, didn't understand the input.\")\n\n    if duration % 1:\n        duration = int(duration) + 1\n    else:\n        duration = int(duration)\n    timezone = willie.tools.get_timezone(\n        bot.db, bot.config, None, trigger.nick, trigger.sender)\n    create_reminder(bot, trigger, duration, reminder, timezone)\n\n\n@commands('at')\n@example('.at 13:47 Do your homework!')\ndef at(bot, trigger):\n    \"\"\"\n    Gives you a reminder at the given time. Takes hh:mm:ssTimezone\n    message. Timezone is any timezone Willie takes elsewhere; the best choices\n    are those from the tzdb; a list of valid options is available at\n    http://dft.ba/-tz . The seconds and timezone are optional.\n    \"\"\"\n    regex = re.compile(r'(\\d+):(\\d+)(?::(\\d+))?([^\\s\\d]+)? (.*)')\n    match = regex.match(trigger.group(2))\n    if not match:\n        bot.reply(\"Sorry, but I didn't understand your input.\")\n        return NOLIMIT\n    hour, minute, second, tz, message = match.groups()\n    if not second:\n        second = '0'\n\n    if pytz:\n        timezone = willie.tools.get_timezone(bot.db, bot.config, tz,\n                                             trigger.nick, trigger.sender)\n        if not timezone:\n            timezone = 'UTC'\n        now = datetime.now(pytz.timezone(timezone))\n        at_time = datetime(now.year, now.month, now.day,\n                           int(hour), int(minute), int(second),\n                           tzinfo=now.tzinfo)\n        timediff = at_time - now\n    else:\n        if tz and tz.upper() != 'UTC':\n            bot.reply(\"I don't have timzeone support installed.\")\n            return NOLIMIT\n        now = datetime.now()\n        at_time = datetime(now.year, now.month, now.day,\n                           int(hour), int(minute), int(second))\n        timediff = at_time - now\n\n    duration = timediff.seconds\n\n    if duration < 0:\n        duration += 86400\n    create_reminder(bot, trigger, duration, message, 'UTC')\n\n\ndef create_reminder(bot, trigger, duration, message, tz):\n    t = int(time.time()) + duration\n    reminder = (trigger.sender, trigger.nick, message)\n    try:\n        bot.rdb[t].append(reminder)\n    except KeyError:\n        bot.rdb[t] = [reminder]\n\n    dump_database(bot.rfn, bot.rdb)\n\n    if duration >= 60:\n        remind_at = datetime.utcfromtimestamp(t)\n        timef = willie.tools.format_time(bot.db, bot.config, tz, trigger.nick,\n                                         trigger.sender, remind_at)\n\n        bot.reply('Okay, will remind at %s' % timef)\n    else:\n        bot.reply('Okay, will remind in %s secs' % duration)\n", "path": "willie/modules/remind.py"}]}