let time = dayjs().tz('Asia/Ho_Chi_Minh');
console.log('Asia/Ho_Chi_Minh: ' + time.format('HH:mm'));
time = time.tz('Asia/Singapore');
console.log('Asia/Singapore: ' + time.format('HH:mm'));
output:
Asia/Ho_Chi_Minh: 00:30
Asia/Singapore: 02:30
Expected behavior
output:
Asia/Ho_Chi_Minh: 00:30
Asia/Singapore: 01:30
The differences should only be 1 hour. The same code used to result correct time but suddenly became incorrect
I suppect this error somehow connect with daylight saving, because it only come up during the the day that the clock change. Right now the function working correctly again.
Describe the bug Demo code:
output:
Expected behavior output:
The differences should only be 1 hour. The same code used to result correct time but suddenly became incorrect
Information