You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reviewing an issue in Cron; a library that utilizes moment-timezone for time zone support. We were able to trace it back to the unexpected behavior occurring from reading date.days() value after triggering date.add(1,'d')`
Steps to reproduce:
const moment = require('moment-timezone');
const date= moment.tz(new Date("Sat Nov 03 2018 00:00:00 GMT-0300"),"America/Sao_Paulo")
console.log(date.days());
console.log(date.toString()); // outputs: Sat Nov 03 2018 00:00:00 GMT-0300
date.add(1,'d');
console.log(date.days())
console.log(date.toString()) // outputs: Sat Nov 03 2018 23:00:00 GMT-0300 but should be Sat Nov 04 2018 00:00:00 GMT-0200
The text was updated successfully, but these errors were encountered:
jodevsa
changed the title
"moment.add(1,'d')" doesn't behaving as expected with "America/Sao_Paulo" timezone
"moment().add(1,'d')" doesn't behaving as expected with "America/Sao_Paulo" timezone
Oct 5, 2018
jodevsa
changed the title
"moment().add(1,'d')" doesn't behaving as expected with "America/Sao_Paulo" timezone
"moment().add(1,'d')" doesn't behave as expected around timezone changes
Oct 5, 2018
Hi there,
After reviewing an issue in Cron; a library that utilizes moment-timezone for time zone support. We were able to trace it back to the unexpected behavior occurring from reading date.days() value after triggering date.add(1,'d')`
Steps to reproduce:
The text was updated successfully, but these errors were encountered: