MCPcopy Create free account
hub / github.com/apache/cloudstack / loadTimeZone

Function loadTimeZone

ui/src/utils/timezone/index.js:18–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16// under the License.
17
18function loadTimeZone () {
19 const timeZoneJson = require.context('./', true, /[A-Za-z0-9-_,\s]+\.json$/i)
20 const data = []
21
22 timeZoneJson.keys().forEach(key => {
23 const matched = key.match(/([A-Za-z0-9-_]+)\./i)
24 if (matched && matched.length > 1) {
25 const json = timeZoneJson(key)
26 for (const index in json) {
27 data.push({
28 id: index,
29 name: json[index]
30 })
31 }
32 }
33 })
34
35 return data
36}
37
38function getFullTimeZone (strQuery) {
39 if (!strQuery || strQuery === '') {

Callers 1

timeZoneFunction · 0.85

Calls 2

keysMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected