Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: default timezone to user's local timezone in activate form (#5374)

Charles Zhou2b0c7791732b
diff --git a/web/app/activate/activateForm.tsx b/web/app/activate/activateForm.tsx
index a790d2a9c7e..709fe4ce2a7 100644
--- a/web/app/activate/activateForm.tsx
+++ b/web/app/activate/activateForm.tsx
@@ -41,10 +41,9 @@ const ActivateForm = () => {
const [name, setName] = useState('')
const [password, setPassword] = useState('')
- const [timezone, setTimezone] = useState('Asia/Shanghai')
+ const [timezone, setTimezone] = useState(Intl.DateTimeFormat().resolvedOptions().timeZone)
const [language, setLanguage] = useState(locale)
const [showSuccess, setShowSuccess] = useState(false)
- const defaultLanguage = useCallback(() => (window.navigator.language.startsWith('zh') ? LanguagesSupported[1] : LanguagesSupported[0]) || LanguagesSupported[0], [])
const showErrorMessage = useCallback((message: string) => {
Toast.notify({