Closed Bug 288083 Opened 20 years ago Closed 20 years ago

format_time should allow different time/date formats

Categories

(Bugzilla :: Bugzilla-General, enhancement)

2.19.2
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

Now that all timestamp fields have been removed from the DB, bug 156834, a part
of the code from format_time() in Util.pm is now useless:

    if ($time =~ m/^\d{14}$/) {
        # We appear to have a timestamp direct from MySQL

Moreover, as part of bug 287487 comment 5, this function does not allow me to
choose the "%Y-%m-%d" format or any other format we could need. Then it appears
necessary to extend its capability to accept different time formats as a parameter.

I will try to make it backward compatible with the existing code in order to
change as few code as possible.
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 2.20
No longer blocks: 287487
Depends on: 287487
Whiteboard: [blocker will fix]
Remember that the sole current purpose of format_time is to standardize date
display throughout all of Bugzilla.

If it does allow custom formats, it should make sure to always leave open the
option of not specifying a format, and the POD docs should specify that that is
the preferred use for displaying a date in Bugzilla.
Severity: normal → enhancement
format_time() now allows you to specify the default time format, see bug 287487.
Fixed!
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: [blocker will fix]
You need to log in before you can comment on or make changes to this bug.