Skip to content

Commit

Permalink
Fixed utc.valueOf not taking DST into account
Browse files Browse the repository at this point in the history
  • Loading branch information
SkaceKamen committed Mar 1, 2022
1 parent c7a3f73 commit b88a359
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugin/utc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default (option, Dayjs, dayjs) => {

proto.valueOf = function () {
const addedOffset = !this.$utils().u(this.$offset)
? this.$offset + (this.$x.$localOffset || (new Date()).getTimezoneOffset()) : 0
? this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset()) : 0
return this.$d.valueOf() - (addedOffset * MILLISECONDS_A_MINUTE)
}

Expand Down

0 comments on commit b88a359

Please sign in to comment.