Namespace: tz

.thirdParty.moment.tz

Methods

(static) timezoneMap()

A getter for the array of strings that can be directly used with moment.tz to add links for the names of the timezones that SharePoint has. I.e. after registering the links with moment.tz, one would be able to send the string representation that SharePoint has to identify a timezone to moment.tz and expect it to work.
Source:
Example
// add the links to moment.tz
moment.tz.link(sputils.thirdParty.moment.tz.links());
// get the timezone for the web
sputils.rest.get('_api/Web/RegionalSettings/TimeZone')
  .then(function (result) {
    var spTzName = result.d.Description; // unwrap
    var momentInstance = moment.tz(spTzName); // create the moment.tz instance
    var repr = momentInstance.format('LLLL z');
    console.log(repr);
  });