mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-21 19:54:11 +00:00
fix: timezone count (#4604)
* fix: timezone count * fix: ts * fix: test llm
This commit is contained in:
@@ -30,7 +30,7 @@ export const getTimezoneOffset = (timeZone: string): number => {
|
||||
*
|
||||
* Generated by Trelent
|
||||
*/
|
||||
export const timezoneList = () => {
|
||||
export const getTimeZoneList = () => {
|
||||
const result = timezones
|
||||
.map((timezone) => {
|
||||
try {
|
||||
@@ -71,6 +71,23 @@ export const timezoneList = () => {
|
||||
time: number;
|
||||
}[];
|
||||
};
|
||||
export const timeZoneList = getTimeZoneList();
|
||||
|
||||
export const getMongoTimezoneCode = (timeString: string) => {
|
||||
if (!timeString.includes(':')) {
|
||||
return '+00:00';
|
||||
}
|
||||
|
||||
if (timeString.includes('+')) {
|
||||
const timezoneMatch = timeString.split('+');
|
||||
return `+${timezoneMatch[1]}`;
|
||||
} else if (timeString.includes('-')) {
|
||||
const timezoneMatch = timeString.split('-');
|
||||
return `-${timezoneMatch[1]}`;
|
||||
} else {
|
||||
return '+00:00';
|
||||
}
|
||||
};
|
||||
|
||||
export const getSystemTime = (timeZone: string) => {
|
||||
const timezoneDiff = getTimezoneOffset(timeZone);
|
||||
|
@@ -7,8 +7,8 @@ export type CreateTrainingUsageProps = {
|
||||
};
|
||||
|
||||
export type GetUsageProps = {
|
||||
dateStart: Date;
|
||||
dateEnd: Date;
|
||||
dateStart: string;
|
||||
dateEnd: string;
|
||||
sources?: UsageSourceEnum[];
|
||||
teamMemberIds?: string[];
|
||||
projectName?: string;
|
||||
|
Reference in New Issue
Block a user