summaryrefslogtreecommitdiff
path: root/alot/helper.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-01-17 17:15:51 -0800
committerDylan Baker <dylan@pnwbakers.com>2017-01-17 17:15:51 -0800
commitaf5045f26e6e9d2834103c5cecef2adf946e7f8d (patch)
treef8cb8ff70ac252a108c7360f785d297cccb3369f /alot/helper.py
parent2db55f22afe1fec8d53711a8d31f3ebaea577e1a (diff)
helper: Don't rely on GNU extensions for strftime
While the reality is that most alot users probably have glibc as their C library and can therefore rely on %P, it is possible that there are users or potential users who run a *BSD or other unix-like OS. This leaves only non-GNU extensions, though some of the extensions are specified in later POSIX, unix or C specifications.
Diffstat (limited to 'alot/helper.py')
-rw-r--r--alot/helper.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/helper.py b/alot/helper.py
index 1326f97e..a354d7a0 100644
--- a/alot/helper.py
+++ b/alot/helper.py
@@ -235,7 +235,7 @@ def pretty_datetime(d):
>>> pretty_datetime(now - timedelta(days=356))
u'Apr 2011'
"""
- ampm = d.strftime('%P')
+ ampm = d.strftime('%p').lower()
if len(ampm):
hourfmt = '%I' + ampm
hourminfmt = '%I:%M' + ampm