ashb commented on a change in pull request #7693: [AIRFLOW-7046]
Locale-formatted datetimes (UI only)
URL: https://github.com/apache/airflow/pull/7693#discussion_r391753419
##########
File path: airflow/www/utils.py
##########
@@ -282,7 +289,18 @@ def dt(attr):
f = f.isoformat() if f else ''
if timezone.utcnow().isoformat()[:4] == f[:4]:
f = f[5:]
- return Markup("<nobr>{}</nobr>").format(f)
+ return Markup('<time datetime="{}">{}</time>').format(f, f)
+ return dt
+
+
+def localized_f(attr_name):
Review comment:
```suggestion
def localized_dt_f(attr_name):
```
Otherwise it's not immediately obvious from the use in views.py what is
being localised
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services