Hello devs,
a PR that unifies the way how we print the date/time information in Foreman
was merged recently [1], it will be present in 1.16 release. If you're a
plugin author or will ever need to print a date/time please use one of the
following helper
date_time_absolute(time, format = :short)
date_time_relative(time)
It will print the information in either absolute or relative way and hovering
a mouse cursor over it will display the complementary information in a
tooltip. Also by using this, it will ensure the format of the date is always
the same.
For existing plugins, I'd ask you to consider changing existing code to start
using these helpers. I've created tracking issues for plugins and linked them
to original issue [3], please add more if I missed some plugin that needs it.
The How to Create a Plugin wiki page was already updated [2].
Since the change seems trivial (except for Katello) I think it would be great
if we could adopt it in releases aligned with 1.16.
[1] https://github.com/theforeman/foreman/pull/4820
[2] About - Foreman
How_to_Create_a_Plugin#Printing-date-and-time
[3] Feature #19047: Unify the way how we display dates - Foreman
Please let me know if you have any questions