forked from varia/bots
reverting back to prev time formatting, the iso format was a test
This commit is contained in:
parent
04b4574649
commit
03e2dcd79e
@ -102,7 +102,7 @@ class Logbot(Bot):
|
|||||||
if "@" in folder_name: # hacky
|
if "@" in folder_name: # hacky
|
||||||
folder_name = self._parse_room_name(folder_name)
|
folder_name = self._parse_room_name(folder_name)
|
||||||
feed_path = os.path.join(self.output, folder_name, "feed.rss.xml")
|
feed_path = os.path.join(self.output, folder_name, "feed.rss.xml")
|
||||||
date = datetime.now().isoformat()
|
date = datetime.now().strftime("%a, %d %b %Y %H:%M:%S")
|
||||||
print(date)
|
print(date)
|
||||||
template = jinja2.Template(open("template.rss").read()) # self.feedtemplate would be useful to have in the conf
|
template = jinja2.Template(open("template.rss").read()) # self.feedtemplate would be useful to have in the conf
|
||||||
with open(feed_path, "w") as out:
|
with open(feed_path, "w") as out:
|
||||||
@ -121,7 +121,7 @@ class Logbot(Bot):
|
|||||||
"""Save new entry to database."""
|
"""Save new entry to database."""
|
||||||
keys = [x for x in self.db[message.room]["messages"].keys()]
|
keys = [x for x in self.db[message.room]["messages"].keys()]
|
||||||
keys.sort(key=int)
|
keys.sort(key=int)
|
||||||
date = datetime.now().isoformat()
|
date = datetime.now().strftime("%a, %d %b %Y %H:%M:%S")
|
||||||
if not keys:
|
if not keys:
|
||||||
new_key = "0"
|
new_key = "0"
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user