mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 01:34:24 +08:00
fix the dates in Statistics & Analysis page does not be processed for daylight saving time
This commit is contained in:
+15
-1
@@ -167,13 +167,19 @@ import {
|
||||
isBoolean,
|
||||
objectFieldWithValueToArrayItem
|
||||
} from './common.ts';
|
||||
import {
|
||||
getTimeZone
|
||||
} from './settings.ts';
|
||||
import {
|
||||
getGoogleMapAPIKey,
|
||||
getBaiduMapAK,
|
||||
getAmapApplicationKey,
|
||||
getExchangeRatesRequestTimeout
|
||||
} from './server_settings.ts';
|
||||
import { getTimezoneOffsetMinutes } from './datetime.ts';
|
||||
import {
|
||||
getTimezoneOffsetMinutes,
|
||||
guessTimezoneName
|
||||
} from './datetime.ts';
|
||||
import { generateRandomUUID } from './misc.ts';
|
||||
import { getBasePath } from './web.ts';
|
||||
import logger from './logger.ts';
|
||||
@@ -204,6 +210,14 @@ axios.interceptors.request.use((config: ApiRequestConfig) => {
|
||||
|
||||
config.headers['X-Timezone-Offset'] = getTimezoneOffsetMinutes();
|
||||
|
||||
let timezoneName = getTimeZone();
|
||||
|
||||
if (!timezoneName || timezoneName.trim().length < 1) {
|
||||
timezoneName = guessTimezoneName();
|
||||
}
|
||||
|
||||
config.headers['X-Timezone-Name'] = timezoneName;
|
||||
|
||||
if (needBlockRequest && !config.ignoreBlocked) {
|
||||
return new Promise(resolve => {
|
||||
blockedRequests.push(newToken => {
|
||||
|
||||
Reference in New Issue
Block a user