From 225b49476121b178e3ed12fced2484e1b89c9303 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Mon, 27 Jan 2014 00:26:30 +0000 Subject: [PATCH] Don't reread list of TZs every time --- src/Utils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Utils.cpp b/src/Utils.cpp index d7f03e08..2be58eb8 100644 --- a/src/Utils.cpp +++ b/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; }