format date according to ISO 8601

This commit is contained in:
Ronald Schaten 2013-04-07 23:52:55 +02:00
parent 4b11d2a01e
commit 5b9cc700f8

View File

@ -59,7 +59,7 @@ def mail_daily_digest(session, sender, receiver, prefix):
text = truncate_text(entry.get_text(), 250)
text = textwrap.fill(text, width=78)
try:
body += '=> %s - %s\n' % (entry.firstfetched.strftime('%y%m%d-%H%M'), feedinfo.title)
body += '=> %s - %s\n' % (entry.firstfetched.strftime('%Y-%m-%dT%H:%M'), feedinfo.title)
body += '>> %s\n' % entry.title
body += '%s\n' % text
body += '%s\n\n' % link
@ -70,7 +70,7 @@ def mail_daily_digest(session, sender, receiver, prefix):
return
if count > 0:
today = datetime.now()
subject = '%s (%s) - %d entries' % (today.strftime('%y%m%d'), today.strftime('%A'), count)
subject = '%s (%s) - %d entries' % (today.strftime('%Y-%m-%d'), today.strftime('%A'), count)
body = '%s\n\n%s\n\n%s' % (subject, ddate(), body)
if prefix != '':
subject = '%s %s' % (prefix, subject)