@ftlab/one-vue3 0.2.7 → 0.2.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ftlab/one-vue3",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "One for Apps based on Element UI",
5
5
  "main": "dist/ftlOne.js",
6
6
  "type": "module",
@@ -17,7 +17,6 @@
17
17
  "type": "git",
18
18
  "url": "git@gitlab.ftlapp.cn:ftl/ftlab/one-vue3.git"
19
19
  },
20
- "types": "index.d.ts",
21
20
  "author": "",
22
21
  "license": "ISC",
23
22
  "auto-changelog": {
package/utils/date.ts CHANGED
@@ -83,8 +83,8 @@ const local_utc_date: dateTransform = (date, defaultStr = '') => {
83
83
 
84
84
  const local_tz_date: tzTransform = (date, tz) => {
85
85
  if (!date || !isValidDate(date)) return '';
86
- const localOffsetInMinutes = dayjs().utcOffset();
87
- const tzOffsetInMinutes = dayjs().tz(tz).utcOffset();
86
+ const localOffsetInMinutes = dayjs(date).utcOffset();
87
+ const tzOffsetInMinutes = dayjs(date).tz(tz).utcOffset();
88
88
  const offsetDifference = localOffsetInMinutes - tzOffsetInMinutes;
89
89
  return offsetDifference > 0
90
90
  ? dayjs(date).add(offsetDifference, 'minutes').toDate()