I have something like this:
my input date is 23.01.2021 00:00 and i select America/New_York and i add it to the momentjs like this
const inputWithTimezone = input + timeZoneUtcFormatt;// e.g. 23.01.2021 00:00 +(-05:00)
const patterns = [moment.ISO_8601, timestampPattern + 'Z'];
parsedMoment = moment(inputWithTimezone, patterns,false));
if printing the 'parsedMoment' now, it shows (Central European Standard Time) but i changed it by adding the utc number (-5) why it does not change the timezone accordignally to america/new_york?
Moment {_isAMomentObject: true, _i: "23.01.2021 00:00-05:00", _f: "DD.MM.YYYY HH:mmZ", _strict: false, _tzm: -300, …}
_d: Sat Jan 23 2021 01:00:00 GMT+0100 (Central European Standard Time) {}
_f: "DD.MM.YYYY HH:mmZ"
_i: "23.01.2021 00:00-05:00"
_isAMomentObject: true
_isUTC: true
_isValid: true
_locale: Locale {_calendar: {…}, _longDateFormat: {…}, _invalidDate: "Invalid date", _dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: ƒ, …}
_offset: -300
_pf: {empty: false, unusedTokens: Array(0), unusedInput: Array(0), overflow: -1, charsLeftOver: 0, …}
_strict: false
_tzm: -300
__proto__: Object