From ec06c97f14047a8f7afe62b5f985530ac2f39491 Mon Sep 17 00:00:00 2001 From: clr-li <111320104+clr-li@users.noreply.github.com> Date: Sun, 25 Feb 2024 14:26:56 -0800 Subject: [PATCH] Run gets local time --- daras_ai_v2/base.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/daras_ai_v2/base.py b/daras_ai_v2/base.py index 0fc63ea33..a921be749 100644 --- a/daras_ai_v2/base.py +++ b/daras_ai_v2/base.py @@ -1914,10 +1914,14 @@ def render_output_caption(): if created_at: if isinstance(created_at, str): created_at = datetime.datetime.fromisoformat(created_at) - format_created_at = created_at.strftime(settings.SHORT_DATETIME_FORMAT) - caption += f' at {format_created_at}' + caption += " at " - st.caption(caption, unsafe_allow_html=True) + with st.div(className="d-flex"): + st.caption(caption, unsafe_allow_html=True) + js_dynamic_date( + created_at, + date_options={"month": "short", "day": "numeric", "year": "numeric"}, + ) def get_example_request_body(