From 9ea642274cf1202ca93f4ec7b7afdf251be9e4df Mon Sep 17 00:00:00 2001 From: w0den Date: Wed, 21 May 2014 16:34:35 +0300 Subject: [PATCH] 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. --- strftime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strftime.js b/strftime.js index 4b50c80..b1be0ab 100644 --- a/strftime.js +++ b/strftime.js @@ -260,7 +260,7 @@ return "GMT"; } else { - var tzString = d.toString().match(/\((\w+)\)/); + var tzString = d.toString().match(/\(([\w\s]+)\)/); return tzString && tzString[1] || ''; }