This commit is contained in:
wchino
2026-06-13 17:38:25 +08:00
parent e7e938f261
commit 7b33d9f9fa
190 changed files with 23222 additions and 4336 deletions

View File

@@ -17,6 +17,12 @@ api.interceptors.request.use((config) => {
const locale = localStorage.getItem('locale') || 'zh-CN';
config.headers['X-Locale'] = locale;
try {
const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
if (timeZone) config.headers['X-Time-Zone'] = timeZone;
} catch {
// Some WebViews may not expose a time zone; the API falls back to UTC.
}
return config;
});