Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 // Copyright 2012 Mozilla Corporation. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /**
5 * @description Tests that valid time zone names are accepted.
6 * @author Norbert Lindenberg
7 */
9 var validTimeZoneNames = [
10 "UTC",
11 "utc" // time zone names are case-insensitive
12 ];
14 validTimeZoneNames.forEach(function (name) {
15 // this must not throw an exception for a valid time zone name
16 var format = new Intl.DateTimeFormat(["de-de"], {timeZone: name});
17 if (format.resolvedOptions().timeZone !== name.toUpperCase()) {
18 $ERROR("Time zone name " + name + " was not correctly accepted; turned into " +
19 format.resolvedOptions().timeZone + ".");
20 }
21 });