I am trying to get the offset in seconds from America/New_York to UTC, and according to the doc I should be able to do:
moment.tz('America/New_York').utcOffset()
But I am getting:
moment.tz is not a function
Note, the syntax you showed here is valid - but it uses the _current_ offset, because no date or time information was passed in the tz function.
Hi, sorry to bump this, but could you provide an example of how to actually supply the instant in time to use? For example, the current time?
@RangerMauve
moment.tz(moment.utc(), 'America/New_York').utcOffset()
// -240 min
Most helpful comment
@RangerMauve