mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-19 08:53:46 +08:00
fix dayjs
This commit is contained in:
11
frontend/src/utils/dateUtil.ts
Normal file
11
frontend/src/utils/dateUtil.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import dayjs from "dayjs";
|
||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||
import timezone from "dayjs/plugin/timezone";
|
||||
import "dayjs/locale/zh-cn";
|
||||
|
||||
dayjs.extend(localizedFormat);
|
||||
dayjs.locale("zh-cn");
|
||||
dayjs.extend(timezone);
|
||||
dayjs.tz.setDefault("Asia/Shanghai");
|
||||
|
||||
export default dayjs;
|
||||
Reference in New Issue
Block a user