@ftlab/one-vue3 0.2.8 → 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/CHANGELOG.md +2 -1
- package/package.json +1 -1
- package/utils/date.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
9
9
|
|
|
10
|
-
## [v0.2.
|
|
10
|
+
## [v0.2.9](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.2.2...v0.2.9)
|
|
11
11
|
|
|
12
12
|
### Commits
|
|
13
13
|
|
|
@@ -17,6 +17,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
17
17
|
- feat: menu style detail change [`93c3abb`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/93c3abba52a689bf6e0e265e4ad2c4aad38605fd)
|
|
18
18
|
- fix: fix collapse style error [`54e9525`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/54e9525a99b216a9f7bb1b29ec578a768b49cb93)
|
|
19
19
|
- fix: remove type declare [`d611d3a`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/d611d3ab302a4426e96f1c1e4e7ae940e427c9a9)
|
|
20
|
+
- fix: winter time tz bug [`3f984ee`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/3f984eebce6e6409084439fd0342bbaf883693c1)
|
|
20
21
|
|
|
21
22
|
## [v0.2.2](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.2.1...v0.2.2) - 2023-12-04
|
|
22
23
|
|
package/package.json
CHANGED
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()
|