From 0625d6a361c410b9e8e7edb59d5c8b409de671d0 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 30 Jun 2025 18:22:40 +0800 Subject: [PATCH] fix: not use local time --- .../auto-update-setting/index.tsx | 12 ++++++---- .../auto-update-setting/utils.spec.ts | 15 ++++++++++++ .../auto-update-setting/utils.ts | 23 +++++++++++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 web/app/components/plugins/reference-setting-modal/auto-update-setting/utils.spec.ts diff --git a/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx b/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx index 49eeba0ec6..3a8d148c34 100644 --- a/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx +++ b/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx @@ -8,7 +8,8 @@ import { useTranslation } from 'react-i18next' import TimePicker from '@/app/components/base/date-and-time-picker/time-picker' import OptionCard from '@/app/components/workflow/nodes/_base/components/option-card' import PluginsPicker from './plugins-picker' -import { dayjsToTimeOfDay, timeOfDayToDayjs } from './utils' +import { convertLocalSecondsToUTCDaySeconds, convertUTCDaySecondsToLocalSeconds, dayjsToTimeOfDay, timeOfDayToDayjs } from './utils' +import { useAppContext } from '@/context/app-context' const i18nPrefix = 'plugin.autoUpdate' @@ -22,6 +23,8 @@ const AutoUpdateSetting: FC = ({ onChange, }) => { const { t } = useTranslation() + const { userProfile: { timezone } } = useAppContext() + const { strategy_setting, upgrade_time_of_day, @@ -97,9 +100,10 @@ const AutoUpdateSetting: FC = ({