From 260fd1c57251f635f7f48753ae25148350941815 Mon Sep 17 00:00:00 2001 From: alsor Date: Thu, 2 Feb 2012 13:25:19 +0400 Subject: [PATCH] Show the time of occurence of an exception with maximum available (stored) precision --- app/views/notices/_summary.html.haml | 2 +- config/initializers/time_formats.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/notices/_summary.html.haml b/app/views/notices/_summary.html.haml index 5eb0265..151e37f 100644 --- a/app/views/notices/_summary.html.haml +++ b/app/views/notices/_summary.html.haml @@ -12,7 +12,7 @@ %td= notice.where %tr %th Occurred - %td= notice.created_at.to_s(:micro) + %td= notice.created_at.to_s(:precise) + (".%03d" % notice.created_at.usec) %tr %th Similar %td= problem.notices_count - 1 diff --git a/config/initializers/time_formats.rb b/config/initializers/time_formats.rb index b3f32e3..f4d3054 100644 --- a/config/initializers/time_formats.rb +++ b/config/initializers/time_formats.rb @@ -1 +1,2 @@ Time::DATE_FORMATS[:micro] = '%b %d %l:%M%P' +Time::DATE_FORMATS[:precise] = '%b %d %H:%M:%S' -- libgit2 0.21.2