5 return new window.Intl.DateTimeFormat().resolvedOptions().timeZone;
11 module.exports = function getTimezoneInfo() {
13 var m = d.toTimeString().match(/\(([^\)]+)\)/);
14 var abbr = (m && m[1]) || '';
15 var offset = d.getTimezoneOffset();
17 var sign = offset >= 0 ? '+' : '-';
18 offset = Math.abs(offset);
19 var hours = Math.floor(offset / 60);
20 var mins = Math.round(offset % 60);
23 offset: sign + (hours > 9 ? hours : '0' + hours) + (mins > 9 ? mins : '0' + mins),
24 iso: sign + (hours > 9 ? hours : '0' + hours) + ':' + (mins > 9 ? mins : '0' + mins),