| 154 | { |
| 155 | public: |
| 156 | TimeZoneStartup(MemoryPool& pool) |
| 157 | : timeZoneList(pool), |
| 158 | nameIdMap(pool) |
| 159 | { |
| 160 | if (!initFromFile()) |
| 161 | { |
| 162 | for (USHORT i = 0; i < FB_NELEM(BUILTIN_TIME_ZONE_LIST); ++i) |
| 163 | { |
| 164 | auto& timeZone = timeZoneList.add(); |
| 165 | timeZone.setName(BUILTIN_TIME_ZONE_LIST[i]); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | unsigned id = 0; |
| 170 | |
| 171 | for (const auto& timeZone : timeZoneList) |
| 172 | { |
| 173 | string name = timeZone.getAsciiName(); |
| 174 | name.upper(); |
| 175 | nameIdMap.put(name, id++); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | const ObjectsArray<TimeZoneDesc>& getTimeZoneList() |
| 180 | { |
nothing calls this directly
no test coverage detected