From 0118f2ee314346a4d8d38c72f2019bac084b39ea Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 1 Feb 2025 15:43:54 -0800 Subject: [PATCH] UI make time filter queries in UTC --- ui/litellm-dashboard/src/components/view_logs/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/litellm-dashboard/src/components/view_logs/index.tsx b/ui/litellm-dashboard/src/components/view_logs/index.tsx index c865042c329..aac8e9c809e 100644 --- a/ui/litellm-dashboard/src/components/view_logs/index.tsx +++ b/ui/litellm-dashboard/src/components/view_logs/index.tsx @@ -105,10 +105,13 @@ export default function SpendLogsTable({ }; } - const formattedStartTime = moment(startTime).format("YYYY-MM-DD HH:mm:ss"); + const formattedStartTime = moment(startTime).utc().format("YYYY-MM-DD HH:mm:ss"); const formattedEndTime = isCustomDate - ? moment(endTime).format("YYYY-MM-DD HH:mm:ss") - : moment().format("YYYY-MM-DD HH:mm:ss"); + ? moment(endTime).utc().format("YYYY-MM-DD HH:mm:ss") + : moment().utc().format("YYYY-MM-DD HH:mm:ss"); + + console.log("formattedStartTime", formattedStartTime); + console.log("formattedEndTime", formattedEndTime); return await uiSpendLogsCall( accessToken,