Skip to content

Commit

Permalink
Merge pull request #9790 from spiffxp/month-in-g8r-shorttimestamp
Browse files Browse the repository at this point in the history
Include the month in gubernator shorttimestamp filters
  • Loading branch information
k8s-ci-robot authored Oct 13, 2018
2 parents cb70002 + 16c67e0 commit 9a88e32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gubernator/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def do_dt_to_epoch(dt):
def do_shorttimestamp(unix_time):
t = datetime.datetime.utcfromtimestamp(unix_time)
return jinja2.Markup('<span class="shorttimestamp" data-epoch="%s">%s</span>' %
(unix_time, t.strftime('%d %H:%M')))
(unix_time, t.strftime('%m-%d %H:%M')))


def do_duration(seconds):
Expand Down
2 changes: 1 addition & 1 deletion gubernator/static/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))) {
Expand Down

0 comments on commit 9a88e32

Please sign in to comment.