From 16c67e0363768d4565a0b328c3e44e3ce33c1392 Mon Sep 17 00:00:00 2001 From: Aaron Crickenberger Date: Fri, 12 Oct 2018 18:17:31 -0700 Subject: [PATCH] Include the month in gubernator shorttimestamp filters Maybe it's just me, but the current shorttimestamp format is not something I'm used to seeing. Including the month would make it easier for me to quickly parse as a human --- gubernator/filters.py | 2 +- gubernator/static/build.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gubernator/filters.py b/gubernator/filters.py index fcb73701403c..06e32ef58f11 100644 --- a/gubernator/filters.py +++ b/gubernator/filters.py @@ -45,7 +45,7 @@ def do_dt_to_epoch(dt): def do_shorttimestamp(unix_time): t = datetime.datetime.utcfromtimestamp(unix_time) return jinja2.Markup('%s' % - (unix_time, t.strftime('%d %H:%M'))) + (unix_time, t.strftime('%m-%d %H:%M'))) def do_duration(seconds): diff --git a/gubernator/static/build.js b/gubernator/static/build.js index 70291733fe02..a09f2a49231b 100644 --- a/gubernator/static/build.js +++ b/gubernator/static/build.js @@ -31,7 +31,7 @@ function fix_timestamps() { } } replace('timestamp', 'YYYY-MM-DD HH:mm z') - replace('shorttimestamp', 'DD HH:mm') + replace('shorttimestamp', 'MM-DD HH:mm') replace('humantimestamp', function(t) { var fmt = 'MMM D, Y'; if (t.isAfter(moment().startOf('day'))) {