Open lanistor opened 1 month ago
https://joseph-mathew.neetorecord.com/watch/03fcfa68-ba46-4aa7-8fc8-aabb8eace0ee
@iamkun Could you please check this issue? The UTC logic for the timezone plugin is added in PR https://github.com/iamkun/dayjs/pull/2693.
Describe the bug Try this in
GMT+0800
timezone:The aim is to turn to user's timezone and then change hour or date, the timezone may be
0 ~12
.Expected behavior
dayjs('2024-10-20T01:00:00').utc().utcOffset(0, true).set('hour', 2);
should getSun, 20 Oct 2024 02:00:00 GMT
;It seem because the
utcOffset
method doesn't change the$d
.Information