Improve detection of timezone name

Timezone name can contain contain spaces (ex. "GTB Daylight Time" or "Pacific Daylight Time") this is why we should use [\w\s+] instead of \w.
This commit is contained in:
w0den 2014-05-21 16:34:35 +03:00
parent f3bed1d081
commit 9ea642274c

View file

@ -260,7 +260,7 @@
return "GMT";
}
else {
var tzString = d.toString().match(/\((\w+)\)/);
var tzString = d.toString().match(/\(([\w\s]+)\)/);
return tzString && tzString[1] || '';
}