You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This task creates a JSON file containing list of timezones and countries. The extracted meta data can be used to list all timezones, list all countries, and filter zones by a country.
158
-
159
-
The output is saved in `data/meta/2014d.json`
160
-
161
-
Sample output:
162
-
163
-
```
164
-
{
165
-
"countries": {
166
-
"AD": {
167
-
"name": "Andorra",
168
-
"abbr": "AD",
169
-
"zones": [
170
-
"Europe/Andorra"
171
-
]
172
-
},
173
-
"AE": {
174
-
"name": "United Arab Emirates",
175
-
"abbr": "AE",
176
-
"zones": [
177
-
"Asia/Dubai"
178
-
]
179
-
},
180
-
...
181
-
},
182
-
"zones": {
183
-
"Europe/Andorra": {
184
-
"name": "Europe/Andorra",
185
-
"lat": 42.5,
186
-
"long": 1.5167,
187
-
"countries": [
188
-
"AD"
189
-
],
190
-
"comments": ""
191
-
},
192
-
"Asia/Dubai": {
193
-
"name": "Asia/Dubai",
194
-
"lat": 25.3,
195
-
"long": 55.3,
196
-
"countries": [
197
-
"AE",
198
-
"OM"
199
-
],
200
-
"comments": ""
201
-
},
202
-
...
203
-
}
204
-
}
205
-
```
206
-
207
227
### 8. Build tests for each zone.
208
228
209
229
```
210
230
grunt data-tests
211
231
```
212
232
213
-
This task does not support tagged releases, and is only run on the latest
214
-
timezone data.
215
-
216
233
Reads data from `temp/collect/latest.json` and constructs unit tests for each
217
234
zone. This uses `temp/collect/latest.json` instead of `data/unpacked/latest.json`
218
235
in order to test both the times _one second before_ and _exactly at_
219
236
each time discontinuity.
220
237
238
+
Without a version, this will write files to the `tests` directory.
239
+
If this is run with a specific version (`grunt data-tests:2014d`), the files will
240
+
be written to `temp/tests/<version>` instead.
241
+
221
242
### All tasks
222
243
223
-
For sanity, all these tasks are bundled into one task. This is the preferred way
244
+
For ease of use, all these tasks are bundled into one task. This is the preferred way
224
245
to compile the data.
225
246
226
247
```
227
248
grunt data # run tasks 1-8 on the latest release
228
-
grunt data:2014c # run tasks 1-7 on the 2014c release
229
-
grunt data:2014d # run tasks 1-7 on the 2014d release
249
+
grunt data:2014c # run tasks 1-8 on the 2014c release
250
+
grunt data:2014d # run tasks 1-8 on the 2014d release
0 commit comments