MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / TimeZoneDataPath

Method TimeZoneDataPath

src/common/TimeZoneUtil.cpp:118–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116 {
117 public:
118 TimeZoneDataPath(MemoryPool& pool)
119 : path(pool)
120 {
121 PathName temp;
122
123 // Could not call fb_utils::getPrefix here.
124 if (FB_TZDATADIR[0] && PathUtils::isRelative(FB_TZDATADIR))
125 PathUtils::concatPath(temp, Config::getRootDirectory(), FB_TZDATADIR);
126 else if (FB_TZDATADIR[0])
127 temp = FB_TZDATADIR;
128 else
129 {
130#ifdef ANDROID
131 temp = Config::getRootDirectory();
132#else
133 PathUtils::concatPath(temp, Config::getRootDirectory(), "tzdata");
134#endif
135 }
136
137 const static char* const ICU_TIMEZONE_FILES_DIR = "ICU_TIMEZONE_FILES_DIR";
138
139 // Do not update ICU_TIMEZONE_FILES_DIR if it's already set.
140 fb_utils::setenv(ICU_TIMEZONE_FILES_DIR, temp.c_str(), false);
141 fb_utils::readenv(ICU_TIMEZONE_FILES_DIR, path);
142 }
143
144 const PathName& get()
145 {

Callers

nothing calls this directly

Calls 3

setenvFunction · 0.85
readenvFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected