Permalink
Browse files

Don't reread list of TZs every time

(cherry picked from commit 225b494)
  • Loading branch information...
1 parent 564a077 commit 3c29bbb7ad6ca05bffe46134affab91366696e58 @DarthGandalf DarthGandalf committed Jan 27, 2014
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/Utils.cpp
View
6 src/Utils.cpp
@@ -452,8 +452,10 @@ namespace {
}
SCString CUtils::GetTimezones() {
- SCString result;
- FillTimezones("/usr/share/zoneinfo", result, "");
+ static SCString result;
+ if (result.empty()) {
+ FillTimezones("/usr/share/zoneinfo", result, "");
+ }
return result;
}

0 comments on commit 3c29bbb

Please sign in to comment.