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
Hi. The 2.0 BETA will call moment.tz.setDefault(userFormatOptions.timezone), for example in getAvailabilities().
There is a bit of a SNAFU with moment-tz in that setDefault will change all moment modules to that timezone. This affects the use of all moment modules. Hence, calling getAvailabilities() will affect the use of moment() throughout the project. For example, check moment().utcOffset() before and after the call. It normally would reflect your browser's timezone, but after getAvailabilities() it will reflect the parseTimezone option.
Hi. The 2.0 BETA will call
moment.tz.setDefault(userFormatOptions.timezone)
, for example in getAvailabilities().There is a bit of a SNAFU with moment-tz in that setDefault will change all moment modules to that timezone. This affects the use of all moment modules. Hence, calling getAvailabilities() will affect the use of moment() throughout the project. For example, check moment().utcOffset() before and after the call. It normally would reflect your browser's timezone, but after getAvailabilities() it will reflect the parseTimezone option.
https://momentjs.com/timezone/docs/#/using-timezones/default-timezone/
moment/moment#3754
Not sure of the best remedy. Perhaps call moment.tz.setDefault() afterwards to reset it? Or maybe setDefault() is too dangerous to use.
The text was updated successfully, but these errors were encountered: