63f02facbcb1d6038a946e3043a5a68eb212145c2ce4ea2437b9fb91a73f91d37292add9d922f3e4e0ace6931a976739d228f0a52e038a885ec9fd94f5b173 526 B

123456789101112131415161718
  1. 'use strict';
  2. var callBind = require('call-bind');
  3. var I402 = typeof Intl === 'undefined' ? null : Intl;
  4. var DateTimeFormat = I402 && I402.DateTimeFormat;
  5. var resolvedOptions = DateTimeFormat && callBind(DateTimeFormat.prototype.resolvedOptions);
  6. // https://262.ecma-international.org/15.0/#sec-systemtimezoneidentifier
  7. module.exports = function SystemTimeZoneIdentifier() {
  8. if (DateTimeFormat && resolvedOptions) {
  9. return resolvedOptions(new DateTimeFormat()).timeZone; // steps 2 - 3
  10. }
  11. return 'UTC'; // step 1
  12. };