webapp: 12-hour times (e.g. 2026-10-05 1:54 PM EDT)
CSV exports keep ISO 8601 24-hour timestamps.
This commit is contained in:
@@ -1513,11 +1513,11 @@ def to_display_tz(value):
|
||||
|
||||
@app.template_filter("local_dt")
|
||||
def local_dt(value, seconds=False):
|
||||
"""Any timestamp shown in the UI, as e.g. '2026-10-05 13:54 EDT'."""
|
||||
"""Any timestamp shown in the UI, 12-hour, as e.g. '2026-10-05 1:54 PM EDT'."""
|
||||
dt = to_display_tz(value)
|
||||
if dt is None:
|
||||
return value or "-"
|
||||
return dt.strftime("%Y-%m-%d %H:%M:%S %Z" if seconds else "%Y-%m-%d %H:%M %Z")
|
||||
return dt.strftime("%Y-%m-%d %-I:%M:%S %p %Z" if seconds else "%Y-%m-%d %-I:%M %p %Z")
|
||||
|
||||
|
||||
@app.template_filter("timestamp_fmt")
|
||||
|
||||
Reference in New Issue
Block a user