-
Notifications
You must be signed in to change notification settings - Fork 31
Description
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.