@myun/gimi-chat 0.9.11 → 0.9.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,3 +48,4 @@ export declare function getValueFromDynamicKey(jsonStr: string): any;
48
48
  export declare function getSelectValue(content: string, moduleInfo: any, isLastItem: boolean, nextItem: IChatMessageItem | undefined): any;
49
49
  export declare function getDisableUploadFile(content: string, moduleInfo: any, isLastItem: boolean): boolean;
50
50
  export declare function formatFields(dataList: IChatMessageItem[], chatList: IChatMessageItem[]): IChatMessageItem[];
51
+ export declare const getTimeZone: () => string;
@@ -471,4 +471,16 @@ export function formatFields(dataList, chatList) {
471
471
  }
472
472
  });
473
473
  return dataList;
474
- }
474
+ }
475
+
476
+ // 获取时区
477
+ export var getTimeZone = function getTimeZone() {
478
+ try {
479
+ if (location.host.includes('.areteup.com')) {
480
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
481
+ }
482
+ return 'Asia/Shanghai';
483
+ } catch (error) {
484
+ return 'Asia/Shanghai';
485
+ }
486
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myun/gimi-chat",
3
- "version": "0.9.11",
3
+ "version": "0.9.13",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",