You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2015/10/16 14:45:41 UTC

[1/2] ambari git commit: AMBARI-13451. Timezone select list needs to be user friendly (onechiporenko)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 cbec44688 -> d1361f716


http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
----------------------------------------------------------------------
diff --git a/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js b/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
index cbfdf1b..5d4a1d1 100644
--- a/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
+++ b/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
@@ -433,49 +433,30 @@
 			"Africa/Ceuta|CET CEST|-10 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
 			"Africa/Johannesburg|SAST|-20|0|",
 			"Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 1o00",
-			"Africa/Windhoek|WAST WAT|-20 -10|01010101010101010101010|1C1c0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0",
 			"America/Adak|HST HDT|a0 90|01010101010101010101010|1BR00 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
 			"America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1BQX0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
 			"America/Anguilla|AST|40|0|",
-			"America/Araguaina|BRT BRST|30 20|010|1IdD0 Lz0",
 			"America/Argentina/Buenos_Aires|ART|30|0|",
-			"America/Asuncion|PYST PYT|30 40|01010101010101010101010|1C430 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0",
 			"America/Atikokan|EST|50|0|",
-			"America/Bahia|BRT BRST|30 20|010|1FJf0 Rb0",
-			"America/Bahia_Banderas|MST CDT CST|70 50 60|01212121212121212121212|1C1l0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0",
-			"America/Belem|BRT|30|0|",
 			"America/Belize|CST|60|0|",
 			"America/Boa_Vista|AMT|40|0|",
 			"America/Bogota|COT|50|0|",
 			"America/Boise|MST MDT|70 60|01010101010101010101010|1BQV0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
-			"America/Campo_Grande|AMST AMT|30 40|01010101010101010101010|1BIr0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10",
 			"America/Cancun|CST CDT EST|60 50 50|010101010102|1C1k0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0",
 			"America/Caracas|VET|4u|0|",
-			"America/Cayenne|GFT|30|0|",
 			"America/Chicago|CST CDT|60 50|01010101010101010101010|1BQU0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
 			"America/Chihuahua|MST MDT|70 60|01010101010101010101010|1C1l0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0",
 			"America/Creston|MST|70|0|",
 			"America/Dawson|PST PDT|80 70|01010101010101010101010|1BQW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
 			"America/Detroit|EST EDT|50 40|01010101010101010101010|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
-			"America/Eirunepe|AMT ACT|40 50|01|1KLE0",
-			"America/Glace_Bay|AST ADT|40 30|01010101010101010101010|1BQS0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
 			"America/Godthab|WGT WGST|30 20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
-			"America/Goose_Bay|AST ADT|40 30|01010101010101010101010|1BQQ1 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
-			"America/Grand_Turk|EST EDT AST|50 40 40|0101010101012|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
-			"America/Guayaquil|ECT|50|0|",
-			"America/Guyana|GYT|40|0|",
 			"America/Havana|CST CDT|50 40|01010101010101010101010|1BQR0 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0",
-			"America/La_Paz|BOT|40|0|",
 			"America/Lima|PET|50|0|",
-			"America/Merida|CST CDT|60 50|01010101010101010101010|1C1k0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0",
 			"America/Metlakatla|PST|80|0|",
 			"America/Miquelon|PMST PMDT|30 20|01010101010101010101010|1BQR0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
 			"America/Montevideo|UYST UYT|20 30|01010101010101010101010|1BQQ0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10",
 			"America/Noronha|FNT|20|0|",
 			"America/North_Dakota/Beulah|MST MDT CST CDT|70 60 60 50|01232323232323232323232|1BQV0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
-			"America/Paramaribo|SRT|30|0|",
-			"America/Port-au-Prince|EST EDT|50 40|0101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
-			"America/Santa_Isabel|PST PDT|80 70|01010101010101010101010|1C1m0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0",
 			"America/Santiago|CLST CLT CLT|30 40 30|010101010102|1C1f0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 1wn0",
 			"America/Sao_Paulo|BRST BRT|20 30|01010101010101010101010|1BIq0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10",
 			"America/Scoresbysund|EGT EGST|10 0|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
@@ -492,26 +473,16 @@
 			"Antarctica/Vostok|VOST|-60|0|",
 			"Asia/Aden|AST|-30|0|",
 			"Asia/Almaty|ALMT|-60|0|",
-			"Asia/Amman|EET EEST|-20 -30|010101010101010101010|1BVy0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0",
 			"Asia/Anadyr|ANAT ANAST ANAT|-c0 -c0 -b0|0120|1BWe0 1qN0 WM0",
-			"Asia/Aqtau|AQTT|-50|0|",
 			"Asia/Ashgabat|TMT|-50|0|",
 			"Asia/Baku|AZT AZST|-40 -50|01010101010101010101010|1BWo0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
 			"Asia/Bangkok|ICT|-70|0|",
-			"Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1BWm0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0",
 			"Asia/Bishkek|KGT|-60|0|",
-			"Asia/Brunei|BNT|-80|0|",
 			"Asia/Calcutta|IST|-5u|0|",
-			"Asia/Chita|YAKT YAKST YAKT IRKT|-90 -a0 -a0 -80|01023|1BWh0 1qM0 WM0 8Hz0",
-			"Asia/Choibalsan|CHOT CHOST|-80 -90|0101010101010|1O8G0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0",
-			"Asia/Chongqing|CST|-80|0|",
-			"Asia/Dacca|BDT|-60|0|",
+			"Asia/Shanghai|CST|-80|0|",
 			"Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1C0m0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0",
-			"Asia/Dili|TLT|-90|0|",
 			"Asia/Dubai|GST|-40|0|",
 			"Asia/Dushanbe|TJT|-50|0|",
-			"Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1BVW1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1210 1nz0 14N0 1nz0 1210 1nz0 1210 1nz0 1210 1nz0",
-			"Asia/Hebron|EET EEST|-20 -30|0101010101010101010101010|1BVy0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1210 1nz0 14N0 1nz0 1210 1nz0 1210 1nz0 1210 1nz0",
 			"Asia/Hong_Kong|HKT|-80|0|",
 			"Asia/Hovd|HOVT HOVST|-70 -80|0101010101010|1O8H0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0",
 			"Asia/Irkutsk|IRKT IRKST IRKT|-80 -90 -90|01020|1BWi0 1qM0 WM0 8Hz0",
@@ -521,32 +492,25 @@
 			"Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1BVA0 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0",
 			"Asia/Kabul|AFT|-4u|0|",
 			"Asia/Kamchatka|PETT PETST PETT|-c0 -c0 -b0|0120|1BWe0 1qN0 WM0",
-			"Asia/Karachi|PKT|-50|0|",
 			"Asia/Kashgar|XJT|-60|0|",
 			"Asia/Kathmandu|NPT|-5J|0|",
 			"Asia/Khandyga|VLAT VLAST VLAT YAKT YAKT|-a0 -b0 -b0 -a0 -90|010234|1BWg0 1qM0 WM0 17V0 7zD0",
 			"Asia/Krasnoyarsk|KRAT KRAST KRAT|-70 -80 -80|01020|1BWj0 1qM0 WM0 8Hz0",
-			"Asia/Kuala_Lumpur|MYT|-80|0|",
 			"Asia/Magadan|MAGT MAGST MAGT MAGT|-b0 -c0 -c0 -a0|01023|1BWf0 1qM0 WM0 8Hz0",
-			"Asia/Makassar|WITA|-80|0|",
 			"Asia/Manila|PHT|-80|0|",
 			"Asia/Nicosia|EET EEST|-20 -30|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
-			"Asia/Novokuznetsk|KRAT NOVST NOVT NOVT|-70 -70 -60 -70|01230|1BWj0 1qN0 WM0 8Hz0",
 			"Asia/Novosibirsk|NOVT NOVST NOVT|-60 -70 -70|01020|1BWk0 1qM0 WM0 8Hz0",
 			"Asia/Omsk|OMST OMSST OMST|-60 -70 -70|01020|1BWk0 1qM0 WM0 8Hz0",
-			"Asia/Oral|ORAT|-50|0|",
 			"Asia/Pyongyang|KST|-90|0|",
-			"Asia/Qyzylorda|QYZT|-60|0|",
 			"Asia/Rangoon|MMT|-6u|0|",
 			"Asia/Sakhalin|SAKT SAKST SAKT|-a0 -b0 -b0|01020|1BWg0 1qM0 WM0 8Hz0",
-			"Asia/Samarkand|UZT|-50|0|",
+			"Asia/Tashkent|UZT|-50|0|",
 			"Asia/Singapore|SGT|-80|0|",
 			"Asia/Srednekolymsk|MAGT MAGST MAGT SRET|-b0 -c0 -c0 -b0|01023|1BWf0 1qM0 WM0 8Hz0",
 			"Asia/Tbilisi|GET|-40|0|",
 			"Asia/Tehran|IRST IRDT|-3u -4u|01010101010101010101010|1BTUu 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0",
 			"Asia/Thimbu|BTT|-60|0|",
 			"Asia/Tokyo|JST|-90|0|",
-			"Asia/Ulaanbaatar|ULAT ULAST|-80 -90|0101010101010|1O8G0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0",
 			"Asia/Ust-Nera|MAGT MAGST MAGT VLAT VLAT|-b0 -c0 -c0 -b0 -a0|010234|1BWf0 1qM0 WM0 17V0 7zD0",
 			"Asia/Vladivostok|VLAT VLAST VLAT|-a0 -b0 -b0|01020|1BWg0 1qM0 WM0 8Hz0",
 			"Asia/Yakutsk|YAKT YAKST YAKT|-90 -a0 -a0|01020|1BWh0 1qM0 WM0 8Hz0",
@@ -595,11 +559,9 @@
 			"Etc/UCT|UCT|0|0|",
 			"Etc/UTC|UTC|0|0|",
 			"Europe/Belfast|GMT BST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
-			"Europe/Kaliningrad|EET EEST FET|-20 -30 -30|01020|1BWo0 1qM0 WM0 8Hz0",
 			"Europe/Minsk|EET EEST FET MSK|-20 -30 -30 -30|01023|1BWo0 1qM0 WM0 8Hy0",
 			"Europe/Moscow|MSK MSD MSK|-30 -40 -40|01020|1BWn0 1qM0 WM0 8Hz0",
 			"Europe/Samara|SAMT SAMST SAMT|-40 -40 -30|0120|1BWm0 1qN0 WM0",
-			"Europe/Simferopol|EET EEST MSK MSK|-20 -30 -40 -30|01010101023|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0",
 			"HST|HST|a0|0|",
 			"Indian/Chagos|IOT|-60|0|",
 			"Indian/Christmas|CXT|-70|0|",
@@ -622,7 +584,6 @@
 			"Pacific/Funafuti|TVT|-c0|0|",
 			"Pacific/Galapagos|GALT|60|0|",
 			"Pacific/Gambier|GAMT|90|0|",
-			"Pacific/Guadalcanal|SBT|-b0|0|",
 			"Pacific/Guam|ChST|-a0|0|",
 			"Pacific/Kiritimati|LINT|-e0|0|",
 			"Pacific/Kosrae|KOST|-b0|0|",
@@ -644,101 +605,30 @@
 		],
 		"links": [
 			"Africa/Abidjan|Africa/Accra",
-			"Africa/Abidjan|Africa/Bamako",
-			"Africa/Abidjan|Africa/Banjul",
-			"Africa/Abidjan|Africa/Bissau",
-			"Africa/Abidjan|Africa/Conakry",
 			"Africa/Abidjan|Africa/Dakar",
-			"Africa/Abidjan|Africa/Freetown",
-			"Africa/Abidjan|Africa/Lome",
-			"Africa/Abidjan|Africa/Monrovia",
-			"Africa/Abidjan|Africa/Nouakchott",
-			"Africa/Abidjan|Africa/Ouagadougou",
 			"Africa/Abidjan|Africa/Sao_Tome",
-			"Africa/Abidjan|Africa/Timbuktu",
-			"Africa/Abidjan|America/Danmarkshavn",
 			"Africa/Abidjan|Atlantic/Reykjavik",
 			"Africa/Abidjan|Atlantic/St_Helena",
-			"Africa/Abidjan|Etc/GMT",
-			"Africa/Abidjan|Etc/GMT+0",
-			"Africa/Abidjan|Etc/GMT-0",
-			"Africa/Abidjan|Etc/GMT0",
-			"Africa/Abidjan|Etc/Greenwich",
-			"Africa/Abidjan|GMT",
-			"Africa/Abidjan|GMT+0",
-			"Africa/Abidjan|GMT-0",
-			"Africa/Abidjan|GMT0",
 			"Africa/Abidjan|Greenwich",
 			"Africa/Abidjan|Iceland",
 			"Africa/Addis_Ababa|Africa/Asmara",
-			"Africa/Addis_Ababa|Africa/Asmera",
-			"Africa/Addis_Ababa|Africa/Dar_es_Salaam",
 			"Africa/Addis_Ababa|Africa/Djibouti",
 			"Africa/Addis_Ababa|Africa/Juba",
-			"Africa/Addis_Ababa|Africa/Kampala",
-			"Africa/Addis_Ababa|Africa/Khartoum",
-			"Africa/Addis_Ababa|Africa/Mogadishu",
 			"Africa/Addis_Ababa|Africa/Nairobi",
-			"Africa/Addis_Ababa|Indian/Antananarivo",
 			"Africa/Addis_Ababa|Indian/Comoro",
-			"Africa/Addis_Ababa|Indian/Mayotte",
 			"Africa/Algiers|Africa/Tunis",
-			"Africa/Bangui|Africa/Brazzaville",
-			"Africa/Bangui|Africa/Douala",
-			"Africa/Bangui|Africa/Kinshasa",
-			"Africa/Bangui|Africa/Lagos",
-			"Africa/Bangui|Africa/Libreville",
-			"Africa/Bangui|Africa/Luanda",
-			"Africa/Bangui|Africa/Malabo",
-			"Africa/Bangui|Africa/Ndjamena",
 			"Africa/Bangui|Africa/Niamey",
-			"Africa/Bangui|Africa/Porto-Novo",
-			"Africa/Blantyre|Africa/Bujumbura",
-			"Africa/Blantyre|Africa/Gaborone",
-			"Africa/Blantyre|Africa/Harare",
 			"Africa/Blantyre|Africa/Kigali",
-			"Africa/Blantyre|Africa/Lubumbashi",
-			"Africa/Blantyre|Africa/Lusaka",
-			"Africa/Blantyre|Africa/Maputo",
-			"Africa/Cairo|Egypt",
 			"Africa/Casablanca|Africa/El_Aaiun",
 			"Africa/Ceuta|Arctic/Longyearbyen",
 			"Africa/Ceuta|Atlantic/Jan_Mayen",
-			"Africa/Ceuta|CET",
-			"Africa/Ceuta|Europe/Amsterdam",
-			"Africa/Ceuta|Europe/Andorra",
-			"Africa/Ceuta|Europe/Belgrade",
 			"Africa/Ceuta|Europe/Berlin",
-			"Africa/Ceuta|Europe/Bratislava",
-			"Africa/Ceuta|Europe/Brussels",
-			"Africa/Ceuta|Europe/Budapest",
-			"Africa/Ceuta|Europe/Busingen",
-			"Africa/Ceuta|Europe/Copenhagen",
-			"Africa/Ceuta|Europe/Gibraltar",
-			"Africa/Ceuta|Europe/Ljubljana",
-			"Africa/Ceuta|Europe/Luxembourg",
 			"Africa/Ceuta|Europe/Madrid",
-			"Africa/Ceuta|Europe/Malta",
-			"Africa/Ceuta|Europe/Monaco",
 			"Africa/Ceuta|Europe/Oslo",
 			"Africa/Ceuta|Europe/Paris",
-			"Africa/Ceuta|Europe/Podgorica",
-			"Africa/Ceuta|Europe/Prague",
 			"Africa/Ceuta|Europe/Rome",
-			"Africa/Ceuta|Europe/San_Marino",
-			"Africa/Ceuta|Europe/Sarajevo",
-			"Africa/Ceuta|Europe/Skopje",
 			"Africa/Ceuta|Europe/Stockholm",
-			"Africa/Ceuta|Europe/Tirane",
-			"Africa/Ceuta|Europe/Vaduz",
-			"Africa/Ceuta|Europe/Vatican",
 			"Africa/Ceuta|Europe/Vienna",
-			"Africa/Ceuta|Europe/Warsaw",
-			"Africa/Ceuta|Europe/Zagreb",
-			"Africa/Ceuta|Europe/Zurich",
-			"Africa/Ceuta|Poland",
-			"Africa/Johannesburg|Africa/Maseru",
-			"Africa/Johannesburg|Africa/Mbabane",
 			"Africa/Tripoli|Libya",
 			"America/Adak|America/Atka",
 			"America/Adak|US/Aleutian",
@@ -747,232 +637,66 @@
 			"America/Anchorage|America/Sitka",
 			"America/Anchorage|America/Yakutat",
 			"America/Anchorage|US/Alaska",
-			"America/Anguilla|America/Antigua",
-			"America/Anguilla|America/Aruba",
-			"America/Anguilla|America/Barbados",
-			"America/Anguilla|America/Blanc-Sablon",
-			"America/Anguilla|America/Curacao",
-			"America/Anguilla|America/Dominica",
-			"America/Anguilla|America/Grenada",
-			"America/Anguilla|America/Guadeloupe",
-			"America/Anguilla|America/Kralendijk",
-			"America/Anguilla|America/Lower_Princes",
-			"America/Anguilla|America/Marigot",
-			"America/Anguilla|America/Martinique",
-			"America/Anguilla|America/Montserrat",
-			"America/Anguilla|America/Port_of_Spain",
-			"America/Anguilla|America/Puerto_Rico",
-			"America/Anguilla|America/Santo_Domingo",
-			"America/Anguilla|America/St_Barthelemy",
-			"America/Anguilla|America/St_Kitts",
-			"America/Anguilla|America/St_Lucia",
-			"America/Anguilla|America/St_Thomas",
-			"America/Anguilla|America/St_Vincent",
-			"America/Anguilla|America/Tortola",
-			"America/Anguilla|America/Virgin",
-			"America/Argentina/Buenos_Aires|America/Argentina/Catamarca",
-			"America/Argentina/Buenos_Aires|America/Argentina/ComodRivadavia",
-			"America/Argentina/Buenos_Aires|America/Argentina/Cordoba",
-			"America/Argentina/Buenos_Aires|America/Argentina/Jujuy",
-			"America/Argentina/Buenos_Aires|America/Argentina/La_Rioja",
-			"America/Argentina/Buenos_Aires|America/Argentina/Mendoza",
-			"America/Argentina/Buenos_Aires|America/Argentina/Rio_Gallegos",
-			"America/Argentina/Buenos_Aires|America/Argentina/Salta",
-			"America/Argentina/Buenos_Aires|America/Argentina/San_Juan",
-			"America/Argentina/Buenos_Aires|America/Argentina/San_Luis",
-			"America/Argentina/Buenos_Aires|America/Argentina/Tucuman",
-			"America/Argentina/Buenos_Aires|America/Argentina/Ushuaia",
 			"America/Argentina/Buenos_Aires|America/Buenos_Aires",
-			"America/Argentina/Buenos_Aires|America/Catamarca",
-			"America/Argentina/Buenos_Aires|America/Cordoba",
-			"America/Argentina/Buenos_Aires|America/Jujuy",
-			"America/Argentina/Buenos_Aires|America/Mendoza",
-			"America/Argentina/Buenos_Aires|America/Rosario",
-			"America/Atikokan|America/Cayman",
-			"America/Atikokan|America/Coral_Harbour",
-			"America/Atikokan|America/Jamaica",
 			"America/Atikokan|America/Panama",
-			"America/Atikokan|EST",
-			"America/Atikokan|Jamaica",
-			"America/Belem|America/Fortaleza",
-			"America/Belem|America/Maceio",
-			"America/Belem|America/Recife",
-			"America/Belem|America/Santarem",
-			"America/Belize|America/Costa_Rica",
-			"America/Belize|America/El_Salvador",
-			"America/Belize|America/Guatemala",
-			"America/Belize|America/Managua",
-			"America/Belize|America/Regina",
-			"America/Belize|America/Swift_Current",
-			"America/Belize|America/Tegucigalpa",
-			"America/Belize|Canada/East-Saskatchewan",
 			"America/Belize|Canada/Saskatchewan",
-			"America/Boa_Vista|America/Manaus",
-			"America/Boa_Vista|America/Porto_Velho",
 			"America/Boa_Vista|Brazil/West",
-			"America/Boise|America/Cambridge_Bay",
 			"America/Boise|America/Denver",
 			"America/Boise|America/Edmonton",
-			"America/Boise|America/Inuvik",
-			"America/Boise|America/Ojinaga",
-			"America/Boise|America/Shiprock",
-			"America/Boise|America/Yellowknife",
 			"America/Boise|Canada/Mountain",
-			"America/Boise|MST7MDT",
 			"America/Boise|Navajo",
 			"America/Boise|US/Mountain",
-			"America/Campo_Grande|America/Cuiaba",
-			"America/Chicago|America/Indiana/Knox",
-			"America/Chicago|America/Indiana/Tell_City",
-			"America/Chicago|America/Knox_IN",
-			"America/Chicago|America/Matamoros",
-			"America/Chicago|America/Menominee",
-			"America/Chicago|America/North_Dakota/Center",
-			"America/Chicago|America/North_Dakota/New_Salem",
-			"America/Chicago|America/Rainy_River",
-			"America/Chicago|America/Rankin_Inlet",
-			"America/Chicago|America/Resolute",
-			"America/Chicago|America/Winnipeg",
-			"America/Chicago|CST6CDT",
 			"America/Chicago|Canada/Central",
 			"America/Chicago|US/Central",
-			"America/Chicago|US/Indiana-Starke",
 			"America/Chihuahua|America/Mazatlan",
 			"America/Chihuahua|Mexico/BajaSur",
-			"America/Creston|America/Dawson_Creek",
-			"America/Creston|America/Hermosillo",
 			"America/Creston|America/Phoenix",
-			"America/Creston|MST",
 			"America/Creston|US/Arizona",
-			"America/Dawson|America/Ensenada",
 			"America/Dawson|America/Los_Angeles",
-			"America/Dawson|America/Tijuana",
 			"America/Dawson|America/Vancouver",
-			"America/Dawson|America/Whitehorse",
-			"America/Dawson|Canada/Pacific",
-			"America/Dawson|Canada/Yukon",
-			"America/Dawson|Mexico/BajaNorte",
-			"America/Dawson|PST8PDT",
 			"America/Dawson|US/Pacific",
-			"America/Dawson|US/Pacific-New",
-			"America/Detroit|America/Fort_Wayne",
-			"America/Detroit|America/Indiana/Indianapolis",
-			"America/Detroit|America/Indiana/Marengo",
-			"America/Detroit|America/Indiana/Petersburg",
-			"America/Detroit|America/Indiana/Vevay",
-			"America/Detroit|America/Indiana/Vincennes",
-			"America/Detroit|America/Indiana/Winamac",
-			"America/Detroit|America/Indianapolis",
-			"America/Detroit|America/Iqaluit",
-			"America/Detroit|America/Kentucky/Louisville",
-			"America/Detroit|America/Kentucky/Monticello",
-			"America/Detroit|America/Louisville",
-			"America/Detroit|America/Montreal",
-			"America/Detroit|America/Nassau",
 			"America/Detroit|America/New_York",
-			"America/Detroit|America/Nipigon",
-			"America/Detroit|America/Pangnirtung",
-			"America/Detroit|America/Thunder_Bay",
 			"America/Detroit|America/Toronto",
 			"America/Detroit|Canada/Eastern",
-			"America/Detroit|EST5EDT",
 			"America/Detroit|US/East-Indiana",
-			"America/Detroit|US/Eastern",
 			"America/Detroit|US/Michigan",
-			"America/Eirunepe|America/Porto_Acre",
-			"America/Eirunepe|America/Rio_Branco",
-			"America/Eirunepe|Brazil/Acre",
 			"America/Glace_Bay|America/Halifax",
 			"America/Glace_Bay|America/Moncton",
 			"America/Glace_Bay|America/Thule",
 			"America/Glace_Bay|Atlantic/Bermuda",
 			"America/Glace_Bay|Canada/Atlantic",
 			"America/Havana|Cuba",
-			"America/Merida|America/Mexico_City",
-			"America/Merida|America/Monterrey",
-			"America/Merida|Mexico/General",
 			"America/Metlakatla|Pacific/Pitcairn",
 			"America/Noronha|Brazil/DeNoronha",
-			"America/Santiago|Antarctica/Palmer",
 			"America/Santiago|Chile/Continental",
 			"America/Sao_Paulo|Brazil/East",
 			"America/St_Johns|Canada/Newfoundland",
 			"Antarctica/McMurdo|Antarctica/South_Pole",
-			"Antarctica/McMurdo|NZ",
 			"Antarctica/McMurdo|Pacific/Auckland",
-			"Asia/Aden|Asia/Baghdad",
-			"Asia/Aden|Asia/Bahrain",
-			"Asia/Aden|Asia/Kuwait",
 			"Asia/Aden|Asia/Qatar",
-			"Asia/Aden|Asia/Riyadh",
-			"Asia/Aqtau|Asia/Aqtobe",
-			"Asia/Ashgabat|Asia/Ashkhabad",
-			"Asia/Bangkok|Asia/Ho_Chi_Minh",
-			"Asia/Bangkok|Asia/Phnom_Penh",
 			"Asia/Bangkok|Asia/Saigon",
-			"Asia/Bangkok|Asia/Vientiane",
 			"Asia/Calcutta|Asia/Colombo",
-			"Asia/Calcutta|Asia/Kolkata",
-			"Asia/Chongqing|Asia/Chungking",
-			"Asia/Chongqing|Asia/Harbin",
-			"Asia/Chongqing|Asia/Macao",
-			"Asia/Chongqing|Asia/Macau",
-			"Asia/Chongqing|Asia/Shanghai",
-			"Asia/Chongqing|Asia/Taipei",
-			"Asia/Chongqing|PRC",
-			"Asia/Chongqing|ROC",
-			"Asia/Dacca|Asia/Dhaka",
 			"Asia/Dubai|Asia/Muscat",
 			"Asia/Hong_Kong|Hongkong",
 			"Asia/Istanbul|Europe/Istanbul",
 			"Asia/Istanbul|Turkey",
 			"Asia/Jakarta|Asia/Pontianak",
-			"Asia/Jerusalem|Asia/Tel_Aviv",
-			"Asia/Jerusalem|Israel",
-			"Asia/Kashgar|Asia/Urumqi",
 			"Asia/Kathmandu|Asia/Katmandu",
-			"Asia/Kuala_Lumpur|Asia/Kuching",
-			"Asia/Makassar|Asia/Ujung_Pandang",
-			"Asia/Nicosia|EET",
 			"Asia/Nicosia|Europe/Athens",
-			"Asia/Nicosia|Europe/Bucharest",
-			"Asia/Nicosia|Europe/Chisinau",
 			"Asia/Nicosia|Europe/Helsinki",
 			"Asia/Nicosia|Europe/Kiev",
-			"Asia/Nicosia|Europe/Mariehamn",
-			"Asia/Nicosia|Europe/Nicosia",
-			"Asia/Nicosia|Europe/Riga",
-			"Asia/Nicosia|Europe/Sofia",
 			"Asia/Nicosia|Europe/Tallinn",
-			"Asia/Nicosia|Europe/Tiraspol",
-			"Asia/Nicosia|Europe/Uzhgorod",
-			"Asia/Nicosia|Europe/Vilnius",
-			"Asia/Nicosia|Europe/Zaporozhye",
 			"Asia/Pyongyang|Asia/Seoul",
-			"Asia/Pyongyang|ROK",
-			"Asia/Samarkand|Asia/Tashkent",
 			"Asia/Singapore|Singapore",
 			"Asia/Tehran|Iran",
-			"Asia/Thimbu|Asia/Thimphu",
 			"Asia/Tokyo|Japan",
-			"Asia/Ulaanbaatar|Asia/Ulan_Bator",
-			"Atlantic/Canary|Atlantic/Faeroe",
 			"Atlantic/Canary|Atlantic/Faroe",
 			"Atlantic/Canary|Atlantic/Madeira",
 			"Atlantic/Canary|Europe/Lisbon",
-			"Atlantic/Canary|Portugal",
-			"Atlantic/Canary|WET",
 			"Australia/ACT|Australia/Canberra",
-			"Australia/ACT|Australia/Currie",
-			"Australia/ACT|Australia/Hobart",
 			"Australia/ACT|Australia/Melbourne",
-			"Australia/ACT|Australia/NSW",
 			"Australia/ACT|Australia/Sydney",
-			"Australia/ACT|Australia/Tasmania",
-			"Australia/ACT|Australia/Victoria",
-			"Australia/Adelaide|Australia/Broken_Hill",
 			"Australia/Adelaide|Australia/South",
-			"Australia/Adelaide|Australia/Yancowinna",
 			"Australia/Brisbane|Australia/Lindeman",
 			"Australia/Brisbane|Australia/Queensland",
 			"Australia/Darwin|Australia/North",
@@ -980,30 +704,11 @@
 			"Australia/Perth|Australia/West",
 			"Chile/EasterIsland|Pacific/Easter",
 			"Eire|Europe/Dublin",
-			"Etc/UCT|UCT",
-			"Etc/UTC|Etc/Universal",
-			"Etc/UTC|Etc/Zulu",
-			"Etc/UTC|UTC",
-			"Etc/UTC|Universal",
-			"Etc/UTC|Zulu",
-			"Europe/Belfast|Europe/Guernsey",
-			"Europe/Belfast|Europe/Isle_of_Man",
-			"Europe/Belfast|Europe/Jersey",
 			"Europe/Belfast|Europe/London",
-			"Europe/Belfast|GB",
-			"Europe/Belfast|GB-Eire",
-			"Europe/Moscow|Europe/Volgograd",
-			"Europe/Moscow|W-SU",
 			"HST|Pacific/Honolulu",
-			"HST|Pacific/Johnston",
 			"HST|US/Hawaii",
-			"Kwajalein|Pacific/Kwajalein",
 			"Kwajalein|Pacific/Majuro",
-			"NZ-CHAT|Pacific/Chatham",
-			"Pacific/Chuuk|Pacific/Truk",
-			"Pacific/Chuuk|Pacific/Yap",
 			"Pacific/Guam|Pacific/Saipan",
-			"Pacific/Midway|Pacific/Pago_Pago",
 			"Pacific/Midway|Pacific/Samoa",
 			"Pacific/Midway|US/Samoa",
 			"Pacific/Pohnpei|Pacific/Ponape"


[2/2] ambari git commit: AMBARI-13451. Timezone select list needs to be user friendly (onechiporenko)

Posted by on...@apache.org.
AMBARI-13451. Timezone select list needs to be user friendly (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d1361f71
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d1361f71
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d1361f71

Branch: refs/heads/branch-2.1
Commit: d1361f716a70308ee6c15e18b40d1eed18e65ec2
Parents: cbec4468
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Fri Oct 16 15:43:32 2015 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Fri Oct 16 15:43:32 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/assets/test/tests.js             |   3 +-
 .../global/user_settings_controller.js          | 166 +++++-----
 .../charts/heatmap_metrics/heatmap_metric.js    |   2 +-
 .../app/mappers/service_metrics_mapper.js       |   2 +-
 .../app/models/alerts/alert_definition.js       |   2 +-
 ambari-web/app/models/alerts/alert_instance.js  |   2 +-
 .../models/configs/service_config_version.js    |   2 +-
 ambari-web/app/templates/common/settings.hbs    |   2 +-
 ambari-web/app/utils/data_manipulation.js       |   2 +-
 ambari-web/app/utils/date.js                    | 242 ---------------
 ambari-web/app/utils/date/date.js               | 215 +++++++++++++
 ambari-web/app/utils/date/timezone.js           | 226 ++++++++++++++
 ambari-web/app/utils/helper.js                  |   4 +-
 ambari-web/app/utils/host_progress_popup.js     |   2 +-
 .../app/views/common/chart/linear_time.js       |   2 +-
 .../app/views/main/alert_definitions_view.js    |   2 +-
 ambari-web/app/views/main/alerts.js             |   2 +-
 .../views/main/charts/heatmap/heatmap_host.js   |   2 +-
 .../main/dashboard/widgets/links_widget.js      |   2 +-
 .../widgets/resource_manager_uptime.js          |   2 +-
 .../views/main/dashboard/widgets/text_widget.js |   2 +-
 .../dashboard/widgets/uptime_text_widget.js     |   2 +-
 ambari-web/app/views/main/host.js               |   2 +-
 ambari-web/app/views/main/host/configs.js       |   2 +-
 ambari-web/app/views/main/host/details.js       |   2 +-
 .../app/views/main/service/services/flume.js    |   2 +-
 .../app/views/main/service/services/hbase.js    |   2 +-
 .../app/views/main/service/services/hdfs.js     |   2 +-
 .../app/views/main/service/services/storm.js    |   2 +-
 .../app/views/main/service/services/yarn.js     |   2 +-
 .../views/wizard/step9/hostLogPopupBody_view.js |   2 +-
 ambari-web/app/views/wizard/step9_view.js       |   2 +-
 .../heatmap_metrics/heatmap_metric_test.js      |   2 +-
 ambari-web/test/utils/date/date_test.js         | 185 ++++++++++++
 ambari-web/test/utils/date/timezone_test.js     | 175 +++++++++++
 ambari-web/test/utils/date_test.js              | 185 ------------
 .../test/views/common/chart/linear_time_test.js |   2 +-
 .../moment-timezone-with-data-2010-2020.js      | 299 +------------------
 38 files changed, 906 insertions(+), 850 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/assets/test/tests.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js
index 9eee1fc..58dc7a6 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -165,7 +165,8 @@ var files = ['test/init_model_test',
   'test/utils/batch_scheduled_requests_test',
   'test/utils/blueprint_test',
   'test/utils/config_test',
-  'test/utils/date_test',
+  'test/utils/date/date_test',
+  'test/utils/date/timezone_test',
   'test/utils/data_manipulation_test',
   'test/utils/config_test',
   'test/utils/form_field_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/controllers/global/user_settings_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/user_settings_controller.js b/ambari-web/app/controllers/global/user_settings_controller.js
index ef53d81..4ad7786 100644
--- a/ambari-web/app/controllers/global/user_settings_controller.js
+++ b/ambari-web/app/controllers/global/user_settings_controller.js
@@ -18,7 +18,7 @@
 
 var App = require('app');
 
-var dateUtils = require('utils/date');
+var timezoneUtils = require('utils/date/timezone');
 
 /**
  * Controller for user settings
@@ -49,47 +49,11 @@ App.UserSettingsController = Em.Controller.extend(App.UserPref, {
       },
       timezone: {
         name: prefix + 'timezone-' + loginName,
-        defaultValue: dateUtils.detectUserTimezone()
+        defaultValue: timezoneUtils.detectUserTimezone()
       }
     };
   }.property('App.router.loginName'),
 
-  init: function () {
-    this.set('timezonesFormatted', this._parseTimezones());
-    this._super();
-  },
-
-  /**
-   *
-   * @private
-   * @method _parseTimezones
-   * @return {{utcOffset: number, label: string, value: string}[]}
-   */
-  _parseTimezones: function () {
-    return dateUtils.getAllTimezoneNames().map(function (timeZoneName) {
-      var zone = moment(new Date()).tz(timeZoneName);
-      var offset = zone.format('Z');
-      return {
-        utcOffset: zone.utcOffset(),
-        label: '(UTC' + offset + ') ' + timeZoneName,
-        value: timeZoneName
-      };
-    }).sort(function (zoneA, zoneB) {
-      if (zoneA.utcOffset === zoneB.utcOffset) {
-        if (zoneA.value === zoneB.value) {
-          return 0;
-        }
-        return zoneA.value < zoneB.value ? -1 : 1;
-      }
-      else {
-        if(zoneA.utcOffset === zoneB.utcOffset) {
-          return 0;
-        }
-        return zoneA.utcOffset < zoneB.utcOffset ? -1 : 1;
-      }
-    });
-  },
-
   /**
    * Load some user's setting from the persist
    * If <code>persistKey</code> is not provided, all settings are loaded
@@ -167,7 +131,8 @@ App.UserSettingsController = Em.Controller.extend(App.UserPref, {
    * @returns {*}
    */
   postUserPref: function (key, value) {
-    return this._super(this.get('userSettingsKeys.' + key + '.name'), value);
+    var k = key.startsWith('userSettingsKeys.') ? key : 'userSettingsKeys.' + key + '.name';
+    return this._super(this.get(k), value);
   },
 
   /**
@@ -179,7 +144,9 @@ App.UserSettingsController = Em.Controller.extend(App.UserPref, {
   },
 
   /**
-   * Open popup with user settings
+   * Check if popup may be opened (based on <code>upgrade_ADMIN</code>)
+   * Open popup with user settings after settings-request is complete
+   *
    * @method showSettingsPopup
    */
   showSettingsPopup: function() {
@@ -187,66 +154,73 @@ App.UserSettingsController = Em.Controller.extend(App.UserPref, {
     if (!App.isAccessible('upgrade_ADMIN')) {
       return;
     }
-    var self = this;
+    this.dataLoading().done(this._showSettingsPopup.bind(this));
+  },
+
+  /**
+   * Show popup with settings for user
+   * Don't call this method directly! Use <code>showSettingsPopup</code>
+   *
+   * @param {object} response
+   * @returns {App.ModalPopup}
+   * @method _showSettingsPopup
+   * @private
+   */
+  _showSettingsPopup: function (response) {
     var curValue = null;
+    var self = this;
     var keys = this.get('userSettingsKeys');
-    var timezonesFormatted = this.get('timezonesFormatted');
-
-    this.dataLoading().done(function (response) {
-      var initValue = JSON.parse(response[keys.show_bg.name]);
-      var initTimezone = timezonesFormatted.findProperty('value', JSON.parse(response[keys.timezone.name]));
-      return App.ModalPopup.show({
-
-        header: Em.I18n.t('common.userSettings'),
-
-        bodyClass: Em.View.extend({
-
-          templateName: require('templates/common/settings'),
-
-          isNotShowBgChecked: !initValue,
-
-          updateValue: function () {
-            curValue = !this.get('isNotShowBgChecked');
-          }.observes('isNotShowBgChecked'),
-
-          /**
-           * @type {{label: string, value: string}}
-           */
-          timezonesList: timezonesFormatted
-
-        }),
-
-        /**
-         * @type {string}
-         */
-        selectedTimezone: initTimezone,
-
-        primary: Em.I18n.t('common.save'),
-
-        onPrimary: function() {
-          if (Em.isNone(curValue)) {
-            curValue = initValue;
-          }
-          if (!App.get('testMode')) {
-            self.postUserPref('show_bg', curValue);
-            self.postUserPref('timezone', this.get('selectedTimezone.value'));
-          }
-          if (this.needsPageRefresh()) {
-            location.reload();
-          }
-          this._super();
-        },
-
-        /**
-         * Determines if page should be refreshed after user click "Save"
-         * @returns {boolean}
-         */
-        needsPageRefresh: function () {
-          return initTimezone !== this.get('selectedTimezone');
+    var timezonesFormatted = timezoneUtils.get('timezones');
+    var initValue = JSON.parse(response[keys.show_bg.name]);
+    var initTimezone = timezonesFormatted.findProperty('value', JSON.parse(response[keys.timezone.name]));
+    return App.ModalPopup.show({
+
+      header: Em.I18n.t('common.userSettings'),
+
+      bodyClass: Em.View.extend({
+
+        templateName: require('templates/common/settings'),
+
+        isNotShowBgChecked: !initValue,
+
+        updateValue: function () {
+          curValue = !this.get('isNotShowBgChecked');
+        }.observes('isNotShowBgChecked'),
+
+        timezonesList: timezonesFormatted
+
+      }),
+
+      /**
+       * @type {string}
+       */
+      selectedTimezone: initTimezone,
+
+      primary: Em.I18n.t('common.save'),
+
+      onPrimary: function() {
+        if (Em.isNone(curValue)) {
+          curValue = initValue;
+        }
+        if (!App.get('testMode')) {
+          self.postUserPref('show_bg', curValue);
+          self.postUserPref('timezone', this.get('selectedTimezone.value'));
+        }
+        if (this.needsPageRefresh()) {
+          location.reload();
         }
+        this._super();
+      },
 
-      })
-    });
+      /**
+       * Determines if page should be refreshed after user click "Save"
+       * @returns {boolean}
+       */
+      needsPageRefresh: function () {
+        return initTimezone !== this.get('selectedTimezone');
+      }
+
+    })
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js b/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js
index 58874ef..3cf1433 100644
--- a/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js
+++ b/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js
@@ -16,7 +16,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 var heatmap = require('utils/heatmap');
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/mappers/service_metrics_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_metrics_mapper.js b/ambari-web/app/mappers/service_metrics_mapper.js
index 5910574..a80b387 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -18,7 +18,7 @@
 var App = require('app');
 var misc = require('utils/misc');
 var stringUtils = require('utils/string_utils');
-var dateUtils = require('utils/date');
+var dateUtils = require('utils/date/date');
 var previousMasterComponentIds = [];
 
 App.serviceMetricsMapper = App.QuickDataMapper.create({

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/models/alerts/alert_definition.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/alerts/alert_definition.js b/ambari-web/app/models/alerts/alert_definition.js
index d1310ff..e33324b 100644
--- a/ambari-web/app/models/alerts/alert_definition.js
+++ b/ambari-web/app/models/alerts/alert_definition.js
@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var dateUtils = require('utils/date');
+var dateUtils = require('utils/date/date');
 
 App.AlertDefinition = DS.Model.extend({
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/models/alerts/alert_instance.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/alerts/alert_instance.js b/ambari-web/app/models/alerts/alert_instance.js
index 33df293..60a2723 100644
--- a/ambari-web/app/models/alerts/alert_instance.js
+++ b/ambari-web/app/models/alerts/alert_instance.js
@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var dateUtils = require('utils/date');
+var dateUtils = require('utils/date/date');
 
 App.AlertInstance = DS.Model.extend({
   id: DS.attr('number'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/models/configs/service_config_version.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/service_config_version.js b/ambari-web/app/models/configs/service_config_version.js
index fcaa45c..0f66f75 100644
--- a/ambari-web/app/models/configs/service_config_version.js
+++ b/ambari-web/app/models/configs/service_config_version.js
@@ -18,7 +18,7 @@
 
 
 var App = require('app');
-var dateUtil = require('utils/date');
+var dateUtil = require('utils/date/date');
 
 
 App.ServiceConfigVersion = DS.Model.extend({

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/templates/common/settings.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/settings.hbs b/ambari-web/app/templates/common/settings.hbs
index 2254c17..4ffc888 100644
--- a/ambari-web/app/templates/common/settings.hbs
+++ b/ambari-web/app/templates/common/settings.hbs
@@ -32,7 +32,7 @@
       {{t app.settings.selectTimezone}}
         {{view Em.Select
           contentBinding="view.timezonesList"
-          optionLabelPath="content.label"
+          optionLabelPath="content.value"
           optionValuePath="content.value"
           selectionBinding="view.parentView.selectedTimezone"
           class="group-select select-group-box"

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/utils/data_manipulation.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/data_manipulation.js b/ambari-web/app/utils/data_manipulation.js
index 09ef79e..29788ff 100644
--- a/ambari-web/app/utils/data_manipulation.js
+++ b/ambari-web/app/utils/data_manipulation.js
@@ -78,7 +78,7 @@ module.exports = {
    * </code>
    * @param {Object[]} collection array of objects
    * @param {String} key property name of each object to be grouped
-   * @returns {*}
+   * @returns {object}
    */
   groupPropertyValues: function(collection, key) {
     var group = {};

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/utils/date.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/date.js b/ambari-web/app/utils/date.js
deleted file mode 100644
index 84b67f9..0000000
--- a/ambari-web/app/utils/date.js
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var validator = require('utils/validator');
-var App = require('app');
-
-module.exports = {
-
-  /**
-   * List of monthes short names
-   * @type {string[]}
-   */
-  dateMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
-
-  /**
-   * List of days short names
-   * @type {string[]}
-   */
-  dateDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
-
-  /**
-   * Add leading zero
-   *
-   * @param {string} time
-   * @returns {string}
-   * @method dateFormatZeroFirst
-   */
-  dateFormatZeroFirst: function (time) {
-    return (time < 10 ? '0' : '') + time;
-  },
-
-  /**
-   * Convert timestamp to date-string
-   * default format - 'DAY_OF_THE_WEEK, MONTH DAY, YEAR HOURS:MINUTES'
-   *
-   * @param {number} timestamp
-   * @param {bool} format
-   * @return {*} date
-   * @method dateFormat
-   */
-  dateFormat: function (timestamp, format) {
-    if (!validator.isValidInt(timestamp)) {
-      return timestamp;
-    }
-    format = format || 'ddd, MMM DD, YYYY HH:mm';
-
-    return moment((new Date(timestamp))).format(format);
-  },
-
-  /**
-   * Convert timestamp to date-string 'DAY_OF_THE_WEEK MONTH DAY YEAR'
-   *
-   * @param {string} timestamp
-   * @return {string}
-   * @method dateFormatShort
-   */
-  dateFormatShort: function (timestamp) {
-    if (!validator.isValidInt(timestamp)) {
-      return timestamp;
-    }
-    var format = 'ddd MMM DD YYYY';
-    var date = moment((new Date(timestamp))).format(format);
-    var today = moment((new Date())).format(format);
-    if (date === today) {
-      return 'Today ' + (new Date(timestamp)).toLocaleTimeString();
-    }
-    return date;
-  },
-
-  /**
-   * Convert starTimestamp to 'DAY_OF_THE_WEEK, MONTH DAY, YEAR HOURS:MINUTES', except for the case: year equals 1969
-   *
-   * @param {string} startTimestamp
-   * @return {string} startTimeSummary
-   * @method startTime
-   */
-  startTime: function (startTimestamp) {
-    if (!validator.isValidInt(startTimestamp)) {
-      return '';
-    }
-    var startDate = new Date(startTimestamp);
-    var months = this.dateMonths;
-    var days = this.dateDays;
-    // generate start time
-    if (startDate.getFullYear() == 1969 || startTimestamp < 1) {
-      return 'Not started';
-    }
-    var startTimeSummary = '';
-    if (new Date(startTimestamp).setHours(0, 0, 0, 0) == new Date().setHours(0, 0, 0, 0)) { //today
-      startTimeSummary = 'Today ' + this.dateFormatZeroFirst(startDate.getHours()) + ':' + this.dateFormatZeroFirst(startDate.getMinutes());
-    } else {
-      startTimeSummary = days[startDate.getDay()] + ' ' + months[startDate.getMonth()] + ' ' +
-        this.dateFormatZeroFirst(startDate.getDate()) + ' ' + startDate.getFullYear() + ' '
-        + this.dateFormatZeroFirst(startDate.getHours()) + ':' + this.dateFormatZeroFirst(startDate.getMinutes());
-    }
-    return startTimeSummary;
-  },
-
-  /**
-   * Provides the duration between the given start and end timestamp. If start time
-   * not valid, duration will be ''. If end time is not valid, duration will
-   * be till now, showing 'Lasted for xxx secs'.
-   *
-   * @param {string} startTimestamp
-   * @param {string} endTimestamp
-   * @return {string} durationSummary
-   * @method durationSummary
-   */
-  durationSummary: function (startTimestamp, endTimestamp) {
-    // generate duration
-    var durationSummary = '';
-    var startDate = new Date(startTimestamp);
-    var endDate = new Date(endTimestamp);
-    if (startDate.getFullYear() == 1969 || startTimestamp < 1) {
-      // not started
-      return Em.I18n.t('common.na');
-    }
-    if (endDate.getFullYear() != 1969 && endTimestamp > 0) {
-      return '' + this.timingFormat(endTimestamp - startTimestamp, 1); //lasted for xx secs
-    } else {
-      // still running, duration till now
-      var time = (App.dateTime() - startTimestamp) < 0 ? 0 : (App.dateTime() - startTimestamp);
-      durationSummary = '' + this.timingFormat(time, 1);
-    }
-    return durationSummary;
-  },
-
-  /**
-   * Convert time in mseconds to
-   * 30 ms = 30 ms
-   * 300 ms = 300 ms
-   * 999 ms = 999 ms
-   * 1000 ms = 1.00 secs
-   * 3000 ms = 3.00 secs
-   * 35000 ms = 35.00 secs
-   * 350000 ms = 350.00 secs
-   * 999999 ms = 999.99 secs
-   * 1000000 ms = 16.66 mins
-   * 3500000 secs = 58.33 mins
-   *
-   * @param {number} time
-   * @param {bool} [zeroValid] for the case to show 0 when time is 0, not null
-   * @return {string|null} formatted date
-   * @method timingFormat
-   */
-  timingFormat: function (time, /* optional */ zeroValid) {
-    var intTime = parseInt(time);
-    if (zeroValid && intTime == 0) {
-      return 0 + ' secs';
-    }
-    if (!intTime) {
-      return null;
-    }
-    var timeStr = intTime.toString();
-    var lengthOfNumber = timeStr.length;
-    var oneMinMs = 60000;
-    var oneHourMs = 3600000;
-    var oneDayMs = 86400000;
-
-    if (lengthOfNumber < 4) {
-      return time + ' ms';
-    }
-    if (lengthOfNumber < 7) {
-      time = (time / 1000).toFixed(2);
-      return time + ' secs';
-    }
-    if (time < oneHourMs) {
-      time = (time / oneMinMs).toFixed(2);
-      return time + ' mins';
-    }
-    if (time < oneDayMs) {
-      time = (time / oneHourMs).toFixed(2);
-      return time + ' hours';
-    }
-    time = (time / oneDayMs).toFixed(2);
-    return time + ' days';
-  },
-
-  /**
-   * Provides the duration between the given start and end time. If start time
-   * is not given, duration will be 0. If end time is not given, duration will
-   * be till now.
-   *
-   * @param {Number} startTime Start time from epoch
-   * @param {Number} endTime End time from epoch
-   * @return {Number} duration
-   * @method duration
-   */
-  duration: function (startTime, endTime) {
-    var duration = 0;
-    if (startTime && startTime > 0) {
-      if (!endTime || endTime < 1) {
-        endTime = App.dateTime();
-      }
-      duration = endTime - startTime;
-    }
-    return duration;
-  },
-
-  /**
-   * Load list of timezones from moment.tz
-   * Zones "Etc/*" are excluded
-   * @returns {object[]}
-   */
-  getAllTimezoneNames: function () {
-    return moment.tz.names().filter(function (timeZoneName) {
-      return !timeZoneName.startsWith('Etc/');
-    });
-  },
-
-  /**
-   * Try detect user's timezone using timezoneOffset and moment.tz
-   * @returns {string}
-   */
-  detectUserTimezone: function () {
-    var timezoneOffset = new Date().getTimezoneOffset();
-    var timezoneNames = this.getAllTimezoneNames();
-    for (var i = 0; i < timezoneNames.length; i++) {
-      var zone = moment.tz.zone(timezoneNames[i]);
-      if (zone.offsets.contains(timezoneOffset)) {
-        return timezoneNames[i];
-      }
-    }
-    return '';
-  }
-
-};

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/utils/date/date.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/date/date.js b/ambari-web/app/utils/date/date.js
new file mode 100644
index 0000000..c51f043
--- /dev/null
+++ b/ambari-web/app/utils/date/date.js
@@ -0,0 +1,215 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var validator = require('utils/validator');
+var App = require('app');
+
+module.exports = {
+
+  /**
+   * List of monthes short names
+   * @type {string[]}
+   */
+  dateMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+
+  /**
+   * List of days short names
+   * @type {string[]}
+   */
+  dateDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+
+  /**
+   * Add leading zero
+   *
+   * @param {string} time
+   * @returns {string}
+   * @method dateFormatZeroFirst
+   */
+  dateFormatZeroFirst: function (time) {
+    return (time < 10 ? '0' : '') + time;
+  },
+
+  /**
+   * Convert timestamp to date-string
+   * default format - 'DAY_OF_THE_WEEK, MONTH DAY, YEAR HOURS:MINUTES'
+   *
+   * @param {number} timestamp
+   * @param {bool} format
+   * @return {*} date
+   * @method dateFormat
+   */
+  dateFormat: function (timestamp, format) {
+    if (!validator.isValidInt(timestamp)) {
+      return timestamp;
+    }
+    format = format || 'ddd, MMM DD, YYYY HH:mm';
+
+    return moment((new Date(timestamp))).format(format);
+  },
+
+  /**
+   * Convert timestamp to date-string 'DAY_OF_THE_WEEK MONTH DAY YEAR'
+   *
+   * @param {string} timestamp
+   * @return {string}
+   * @method dateFormatShort
+   */
+  dateFormatShort: function (timestamp) {
+    if (!validator.isValidInt(timestamp)) {
+      return timestamp;
+    }
+    var format = 'ddd MMM DD YYYY';
+    var date = moment((new Date(timestamp))).format(format);
+    var today = moment((new Date())).format(format);
+    if (date === today) {
+      return 'Today ' + (new Date(timestamp)).toLocaleTimeString();
+    }
+    return date;
+  },
+
+  /**
+   * Convert starTimestamp to 'DAY_OF_THE_WEEK, MONTH DAY, YEAR HOURS:MINUTES', except for the case: year equals 1969
+   *
+   * @param {string} startTimestamp
+   * @return {string} startTimeSummary
+   * @method startTime
+   */
+  startTime: function (startTimestamp) {
+    if (!validator.isValidInt(startTimestamp)) {
+      return '';
+    }
+    var startDate = new Date(startTimestamp);
+    var months = this.dateMonths;
+    var days = this.dateDays;
+    // generate start time
+    if (startDate.getFullYear() == 1969 || startTimestamp < 1) {
+      return 'Not started';
+    }
+    var startTimeSummary = '';
+    if (new Date(startTimestamp).setHours(0, 0, 0, 0) == new Date().setHours(0, 0, 0, 0)) { //today
+      startTimeSummary = 'Today ' + this.dateFormatZeroFirst(startDate.getHours()) + ':' + this.dateFormatZeroFirst(startDate.getMinutes());
+    } else {
+      startTimeSummary = days[startDate.getDay()] + ' ' + months[startDate.getMonth()] + ' ' +
+        this.dateFormatZeroFirst(startDate.getDate()) + ' ' + startDate.getFullYear() + ' '
+        + this.dateFormatZeroFirst(startDate.getHours()) + ':' + this.dateFormatZeroFirst(startDate.getMinutes());
+    }
+    return startTimeSummary;
+  },
+
+  /**
+   * Provides the duration between the given start and end timestamp. If start time
+   * not valid, duration will be ''. If end time is not valid, duration will
+   * be till now, showing 'Lasted for xxx secs'.
+   *
+   * @param {string} startTimestamp
+   * @param {string} endTimestamp
+   * @return {string} durationSummary
+   * @method durationSummary
+   */
+  durationSummary: function (startTimestamp, endTimestamp) {
+    // generate duration
+    var durationSummary = '';
+    var startDate = new Date(startTimestamp);
+    var endDate = new Date(endTimestamp);
+    if (startDate.getFullYear() == 1969 || startTimestamp < 1) {
+      // not started
+      return Em.I18n.t('common.na');
+    }
+    if (endDate.getFullYear() != 1969 && endTimestamp > 0) {
+      return '' + this.timingFormat(endTimestamp - startTimestamp, 1); //lasted for xx secs
+    } else {
+      // still running, duration till now
+      var time = (App.dateTime() - startTimestamp) < 0 ? 0 : (App.dateTime() - startTimestamp);
+      durationSummary = '' + this.timingFormat(time, 1);
+    }
+    return durationSummary;
+  },
+
+  /**
+   * Convert time in mseconds to
+   * 30 ms = 30 ms
+   * 300 ms = 300 ms
+   * 999 ms = 999 ms
+   * 1000 ms = 1.00 secs
+   * 3000 ms = 3.00 secs
+   * 35000 ms = 35.00 secs
+   * 350000 ms = 350.00 secs
+   * 999999 ms = 999.99 secs
+   * 1000000 ms = 16.66 mins
+   * 3500000 secs = 58.33 mins
+   *
+   * @param {number} time
+   * @param {bool} [zeroValid] for the case to show 0 when time is 0, not null
+   * @return {string|null} formatted date
+   * @method timingFormat
+   */
+  timingFormat: function (time, /* optional */ zeroValid) {
+    var intTime = parseInt(time);
+    if (zeroValid && intTime == 0) {
+      return 0 + ' secs';
+    }
+    if (!intTime) {
+      return null;
+    }
+    var timeStr = intTime.toString();
+    var lengthOfNumber = timeStr.length;
+    var oneMinMs = 60000;
+    var oneHourMs = 3600000;
+    var oneDayMs = 86400000;
+
+    if (lengthOfNumber < 4) {
+      return time + ' ms';
+    }
+    if (lengthOfNumber < 7) {
+      time = (time / 1000).toFixed(2);
+      return time + ' secs';
+    }
+    if (time < oneHourMs) {
+      time = (time / oneMinMs).toFixed(2);
+      return time + ' mins';
+    }
+    if (time < oneDayMs) {
+      time = (time / oneHourMs).toFixed(2);
+      return time + ' hours';
+    }
+    time = (time / oneDayMs).toFixed(2);
+    return time + ' days';
+  },
+
+  /**
+   * Provides the duration between the given start and end time. If start time
+   * is not given, duration will be 0. If end time is not given, duration will
+   * be till now.
+   *
+   * @param {Number} startTime Start time from epoch
+   * @param {Number} endTime End time from epoch
+   * @return {Number} duration
+   * @method duration
+   */
+  duration: function (startTime, endTime) {
+    var duration = 0;
+    if (startTime && startTime > 0) {
+      if (!endTime || endTime < 1) {
+        endTime = App.dateTime();
+      }
+      duration = endTime - startTime;
+    }
+    return duration;
+  }
+
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/utils/date/timezone.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/date/timezone.js b/ambari-web/app/utils/date/timezone.js
new file mode 100644
index 0000000..2d8a550
--- /dev/null
+++ b/ambari-web/app/utils/date/timezone.js
@@ -0,0 +1,226 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var dataUtils = require('utils/data_manipulation');
+
+/**
+ * Transitional list of timezones (used to create list of shownTimezone @see shownTimezone)
+ *
+ * <code>utcOffset</code> - offset-value (0, 180, 240 etc)
+ * <code>formattedOffset</code> - formatted offset-value ('+00:00', '-02:00' etc)
+ * <code>value</code> - timezone's name (like 'Europe/Athens')
+ * <code>region</code> - timezone's region (for 'Europe/Athens' it will be 'Europe')
+ * <code>city</code> - timezone's city (for 'Europe/Athens' it will be 'Athens')
+ *
+ * @typedef {{utcOffset: number, formattedOffset: string, value: string, region: string, city: string}} formattedTimezone
+ */
+
+/**
+ * List of timezones used in the user's settings popup
+ *
+ * <code>utcOffset</code> - offset-value (0, 180, 240 etc)
+ * <code>value</code> - string like '(UTC+02:00) Europe / Athens, Kiev, Minsk'
+ * <code>zones</code> - list of zone-objects from <code>moment.tz</code> included to the <code>value</code>
+ *
+ * @typedef {{utcOffset: number, label: string, value: string, zones: object[]}} shownTimezone
+ */
+
+module.exports = Em.Object.create({
+
+  /**
+   * @type {shownTimezone[]}
+   * @readOnly
+   */
+  timezones: [],
+
+  /**
+   * Map of <code>timezones</code>
+   * Key - timezone value (like '(UTC+01:00) Region / City1, City2')
+   * Value - zone-object
+   *
+   * @type {object}
+   * @readOnly
+   */
+  timezonesMappedByLabel: function () {
+    var ret = {};
+    this.get('timezones').forEach(function (tz) {
+      ret[tz.value] = tz;
+    });
+    return ret;
+  }.property('timezones.[]'),
+
+  init: function () {
+    this.set('timezones', this._parseTimezones());
+    return this._super();
+  },
+
+  /**
+   * Load list of timezones from moment.tz
+   * Zones "Etc/*" and abbreviations are excluded
+   *
+   * @returns {string[]}
+   */
+  getAllTimezoneNames: function () {
+    return moment.tz.names().filter(function (timeZoneName) {
+      return timeZoneName.indexOf('Etc/') !== 0 && timeZoneName !== timeZoneName.toUpperCase();
+    });
+  },
+
+  /**
+   * Try detect user's timezone using timezoneOffset and moment.tz
+   * Checking current year January and July offsets
+   * If <code>region</code> is provided, timezone for it is returned and not first valid
+   *
+   * @param {string} [region] preferred region (may be 'Europe', 'America', 'Africa', 'Asia' etc)
+   * @returns {string}
+   */
+  detectUserTimezone: function (region) {
+    region = (region || '').toLowerCase();
+    var currentYear = new Date().getFullYear();
+    var jan = new Date(currentYear, 0, 1);
+    var jul = new Date(currentYear, 6, 1);
+    var janOffset = jan.getTimezoneOffset();
+    var julOffset = jul.getTimezoneOffset();
+    var timezones = this.get('timezones');
+
+    var validZones = [];
+
+    for (var i = 0; i < timezones.length; i++) {
+      var zones = timezones[i].zones;
+      for (var j = 0; j < zones.length; j++) {
+        var zone = moment.tz.zone(zones[j].value);
+        if ((zone.offset(jan) === janOffset) && (zone.offset(jul) === julOffset)) {
+          validZones.pushObject(timezones[i].value);
+        }
+      }
+    }
+    if (validZones.length) {
+      if (region) {
+        for (i = 0; i < validZones.length; i++) {
+          if (validZones[i].toLowerCase().indexOf(region) !== -1) {
+            return validZones[i];
+          }
+        }
+        // Timezone for `region` wasn't found
+        return validZones[0];
+      }
+      // `region` isn't provided, so return first valid timezone
+      return validZones[0];
+    }
+    // are you from Venus?
+    return '';
+  },
+
+  /**
+   * Reformat timezones list and sort it by utcOffset and timeZoneName
+   *
+   * @private
+   * @method _parseTimezones
+   * @returns {shownTimezone[]}
+   */
+  _parseTimezones: function () {
+    var currentYear = new Date().getFullYear();
+    var jan = new Date(currentYear, 0, 1);
+    var jul = new Date(currentYear, 6, 1);
+    var zones = this.getAllTimezoneNames().map(function (timeZoneName) {
+      var zone = moment(new Date()).tz(timeZoneName);
+      var z = moment.tz.zone(timeZoneName);
+      var offset = zone.format('Z');
+      var regionCity = timeZoneName.split('/');
+      var region = regionCity[0];
+      var city = regionCity.length === 2 ? regionCity[1] : '';
+      return {
+        groupByKey: z.offset(jan) + '' + z.offset(jul),
+        utcOffset: zone.utcOffset(),
+        formattedOffset: offset,
+        value: timeZoneName,
+        region: region,
+        city: city.replace(/_/g, ' ')
+      };
+    }).sort(function (zoneA, zoneB) {
+      if (zoneA.utcOffset === zoneB.utcOffset) {
+        if (zoneA.value === zoneB.value) {
+          return 0;
+        }
+        return zoneA.value < zoneB.value ? -1 : 1;
+      } else {
+        if(zoneA.utcOffset === zoneB.utcOffset) {
+          return 0;
+        }
+        return zoneA.utcOffset < zoneB.utcOffset ? -1 : 1;
+      }
+    });
+
+    return this._groupTimezones(zones);
+  },
+
+  /**
+   * Group timezones by <code>groupByKey</code>
+   * Group timezones in the each group by <code>region</code>
+   * <code>city</code> for each regions are joined into string 'city1, city2, city3' (empty cities and abbreviations are ignored)
+   * Example:
+   * <pre>
+   *   var zones = [
+   *    {groupByKey: 1, formattedOffset: '+01:00', value: 'a/Aa', region: 'a', city: 'Aa'},
+   *    {groupByKey: 1, formattedOffset: '+01:00', value: 'a/Bb', region: 'a', city: 'Bb'},
+   *    {groupByKey: 2, formattedOffset: '+02:00', value: 'a/Cc', region: 'a', city: 'Cc'},
+   *    {groupByKey: 2, formattedOffset: '+02:00', value: 'a/Dd', region: 'a', city: 'Dd'},
+   *    {groupByKey: 1, formattedOffset: '+01:00', value: 'b/Ee', region: 'b', city: 'Ee'},
+   *    {groupByKey: 1, formattedOffset: '+01:00', value: 'b/Ff', region: 'b', city: 'Ff'},
+   *    {groupByKey: 2, formattedOffset: '+02:00', value: 'b/Gg', region: 'b', city: 'Gg'},
+   *    {groupByKey: 2, formattedOffset: '+02:00', value: 'b/Hh', region: 'b', city: 'Hh'},
+   *    {groupByKey: 2, formattedOffset: '+02:00', value: 'b/II', region: 'b', city: 'II'}, // will be ignored, because city is abbreviation
+   *    {groupByKey: 2, formattedOffset: '+02:00', value: 'b',    region: 'b', city: ''  }  // will be ignored, because city is empty
+   *   ];
+   *   var groupedZones = _groupTimezones(zones);
+   *   // groupedZones is:
+   *   [
+   *    {utcOffset: 1, value: '(UTC+01:00) a / Aa, Bb'},
+   *    {utcOffset: 1, value: '(UTC+01:00) b / Ee, Ff'},
+   *    {utcOffset: 2, value: '(UTC+02:00) a / Cc, Dd'},
+   *    {utcOffset: 2, value: '(UTC+02:00) b / Gg, Hh'}
+   *   ]
+   * </pre>
+   *
+   * @param {formattedTimezone[]} zones
+   * @returns {shownTimezone[]}
+   * @method _groupTimezones
+   * @private
+   */
+  _groupTimezones: function (zones) {
+    var z = dataUtils.groupPropertyValues(zones, 'groupByKey');
+    var newZones = [];
+    Object.keys(z).forEach(function (offset) {
+      var groupedByRegionZones = dataUtils.groupPropertyValues(z[offset], 'region');
+      Object.keys(groupedByRegionZones).forEach(function (region) {
+        var cities = groupedByRegionZones[region].mapProperty('city').filter(function (city) {
+          return city !== '' && city !== city.toUpperCase();
+        }).uniq().join(', ');
+        var formattedOffset = Em.get(groupedByRegionZones[region], 'firstObject.formattedOffset');
+        var utcOffset = Em.get(groupedByRegionZones[region], 'firstObject.utcOffset');
+        newZones.pushObject({
+          utcOffset: utcOffset,
+          value: '(UTC' + formattedOffset + ') ' + region + (cities ? ' / ' + cities : ''),
+          zones: groupedByRegionZones[region]
+        });
+      });
+    });
+    return newZones.sortProperty('utcOffset');
+  }
+
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/utils/helper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/helper.js b/ambari-web/app/utils/helper.js
index a6a51af..46834c5 100644
--- a/ambari-web/app/utils/helper.js
+++ b/ambari-web/app/utils/helper.js
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 var stringUtils = require('utils/string_utils');
+var timezoneUtils = require('utils/date/timezone');
 
 /**
  * Remove spaces at beginning and ending of line.
@@ -628,7 +629,8 @@ App.dateTime = function() {
 App.dateTimeWithTimeZone = function (x) {
   var timezone = App.router.get('userSettingsController.userSettings.timezone');
   if (timezone) {
-    return moment(moment.tz(x ? new Date(x) : new Date(), timezone).toArray()).toDate().getTime();
+    var tz = Em.getWithDefault(timezoneUtils.get('timezonesMappedByLabel')[timezone], 'zones.0.value', '');
+    return moment(moment.tz(x ? new Date(x) : new Date(), tz).toArray()).toDate().getTime();
   }
   return x || new Date().getTime();
 };

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/utils/host_progress_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/host_progress_popup.js b/ambari-web/app/utils/host_progress_popup.js
index 7e83389..d730f79 100644
--- a/ambari-web/app/utils/host_progress_popup.js
+++ b/ambari-web/app/utils/host_progress_popup.js
@@ -18,7 +18,7 @@
 
 var App = require('app');
 var batchUtils = require('utils/batch_scheduled_requests');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 /**
  * App.HostPopup is for the popup that shows up upon clicking already-performed or currently-in-progress operations

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/common/chart/linear_time.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/chart/linear_time.js b/ambari-web/app/views/common/chart/linear_time.js
index 4c29af7..18f80c3 100644
--- a/ambari-web/app/views/common/chart/linear_time.js
+++ b/ambari-web/app/views/common/chart/linear_time.js
@@ -17,7 +17,7 @@
 
 var App = require('app');
 var string_utils = require('utils/string_utils');
-var dateUtils = require('utils/date');
+var dateUtils = require('utils/date/date');
 
 /**
  * @class

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/alert_definitions_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/alert_definitions_view.js b/ambari-web/app/views/main/alert_definitions_view.js
index 29e4176..05fa0cb 100644
--- a/ambari-web/app/views/main/alert_definitions_view.js
+++ b/ambari-web/app/views/main/alert_definitions_view.js
@@ -19,7 +19,7 @@
 var App = require('app');
 var filters = require('views/common/filter_view'),
   sort = require('views/common/sort_view'),
-  date = require('utils/date');
+  date = require('utils/date/date');
 
 App.MainAlertDefinitionsView = App.TableView.extend({
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/alerts.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/alerts.js b/ambari-web/app/views/main/alerts.js
index d84062e..137f4a5 100644
--- a/ambari-web/app/views/main/alerts.js
+++ b/ambari-web/app/views/main/alerts.js
@@ -19,7 +19,7 @@
 var App = require('app');
 var filters = require('views/common/filter_view');
 var sort = require('views/common/sort_view');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 App.MainAlertsView = App.TableView.extend(App.TableServerViewMixin, {
   templateName:require('templates/main/alerts'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/charts/heatmap/heatmap_host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/charts/heatmap/heatmap_host.js b/ambari-web/app/views/main/charts/heatmap/heatmap_host.js
index d42255e..2abee46 100644
--- a/ambari-web/app/views/main/charts/heatmap/heatmap_host.js
+++ b/ambari-web/app/views/main/charts/heatmap/heatmap_host.js
@@ -15,7 +15,7 @@
  * the License.
  */
 
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 var App = require('app');
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/dashboard/widgets/links_widget.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/links_widget.js b/ambari-web/app/views/main/dashboard/widgets/links_widget.js
index e9dfdca..5647617 100644
--- a/ambari-web/app/views/main/dashboard/widgets/links_widget.js
+++ b/ambari-web/app/views/main/dashboard/widgets/links_widget.js
@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 App.LinkDashboardWidgetView = App.DashboardWidgetView.extend({
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/dashboard/widgets/resource_manager_uptime.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/resource_manager_uptime.js b/ambari-web/app/views/main/dashboard/widgets/resource_manager_uptime.js
index 370ed6e..e67cf39 100644
--- a/ambari-web/app/views/main/dashboard/widgets/resource_manager_uptime.js
+++ b/ambari-web/app/views/main/dashboard/widgets/resource_manager_uptime.js
@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 App.ResourceManagerUptimeView = App.UptimeTextDashboardWidgetView.extend({
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/dashboard/widgets/text_widget.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/text_widget.js b/ambari-web/app/views/main/dashboard/widgets/text_widget.js
index 85b2d54..b51ca6e 100644
--- a/ambari-web/app/views/main/dashboard/widgets/text_widget.js
+++ b/ambari-web/app/views/main/dashboard/widgets/text_widget.js
@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 App.TextDashboardWidgetView = App.DashboardWidgetView.extend({
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/dashboard/widgets/uptime_text_widget.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/uptime_text_widget.js b/ambari-web/app/views/main/dashboard/widgets/uptime_text_widget.js
index a3290de..726ebb8 100644
--- a/ambari-web/app/views/main/dashboard/widgets/uptime_text_widget.js
+++ b/ambari-web/app/views/main/dashboard/widgets/uptime_text_widget.js
@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 App.UptimeTextDashboardWidgetView = App.TextDashboardWidgetView.extend({
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host.js b/ambari-web/app/views/main/host.js
index 82bda20..f821a90 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -19,7 +19,7 @@
 var App = require('app');
 var filters = require('views/common/filter_view');
 var sort = require('views/common/sort_view');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
   templateName:require('templates/main/host'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/host/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/configs.js b/ambari-web/app/views/main/host/configs.js
index 1b8054b..6a6803f 100644
--- a/ambari-web/app/views/main/host/configs.js
+++ b/ambari-web/app/views/main/host/configs.js
@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 App.MainHostConfigsView = Em.View.extend({
   templateName: require('templates/main/host/configs'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details.js b/ambari-web/app/views/main/host/details.js
index ea60181..838502f 100644
--- a/ambari-web/app/views/main/host/details.js
+++ b/ambari-web/app/views/main/host/details.js
@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 App.MainHostDetailsView = Em.View.extend({
   templateName: require('templates/main/host/details'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/service/services/flume.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/flume.js b/ambari-web/app/views/main/service/services/flume.js
index 1ab89f9..f0283e9 100644
--- a/ambari-web/app/views/main/service/services/flume.js
+++ b/ambari-web/app/views/main/service/services/flume.js
@@ -16,7 +16,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 var sort = require('views/common/sort_view');
 
 App.MainDashboardServiceFlumeView = App.TableView.extend(App.MainDashboardServiceViewWrapper, {

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/service/services/hbase.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/hbase.js b/ambari-web/app/views/main/service/services/hbase.js
index d17d2a0..8b6b9f7 100644
--- a/ambari-web/app/views/main/service/services/hbase.js
+++ b/ambari-web/app/views/main/service/services/hbase.js
@@ -16,7 +16,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 var numberUtils = require('utils/number_utils');
 
 App.MainDashboardServiceHbaseView = App.MainDashboardServiceView.extend({

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/service/services/hdfs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/hdfs.js b/ambari-web/app/views/main/service/services/hdfs.js
index f469a89..f53e345 100644
--- a/ambari-web/app/views/main/service/services/hdfs.js
+++ b/ambari-web/app/views/main/service/services/hdfs.js
@@ -16,7 +16,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 var numberUtils = require('utils/number_utils');
 
 App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/service/services/storm.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/storm.js b/ambari-web/app/views/main/service/services/storm.js
index 34242aa..6cd17ac 100644
--- a/ambari-web/app/views/main/service/services/storm.js
+++ b/ambari-web/app/views/main/service/services/storm.js
@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 App.MainDashboardServiceStormView = App.MainDashboardServiceView.extend({
   templateName: require('templates/main/service/services/storm'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/main/service/services/yarn.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/yarn.js b/ambari-web/app/views/main/service/services/yarn.js
index 55d0e53..b80fb76 100644
--- a/ambari-web/app/views/main/service/services/yarn.js
+++ b/ambari-web/app/views/main/service/services/yarn.js
@@ -16,7 +16,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 var numberUtils = require('utils/number_utils');
 
 App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js b/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js
index 301c403..fb61a02 100644
--- a/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js
+++ b/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js
@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 App.WizardStep9HostLogPopupBodyView = Em.View.extend({
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/app/views/wizard/step9_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step9_view.js b/ambari-web/app/views/wizard/step9_view.js
index 3393cc0..b1b20c3 100644
--- a/ambari-web/app/views/wizard/step9_view.js
+++ b/ambari-web/app/views/wizard/step9_view.js
@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 App.WizardStep9View = App.TableView.extend({
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/test/controllers/main/charts/heatmap_metrics/heatmap_metric_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/charts/heatmap_metrics/heatmap_metric_test.js b/ambari-web/test/controllers/main/charts/heatmap_metrics/heatmap_metric_test.js
index 77fef25..b057a80 100644
--- a/ambari-web/test/controllers/main/charts/heatmap_metrics/heatmap_metric_test.js
+++ b/ambari-web/test/controllers/main/charts/heatmap_metrics/heatmap_metric_test.js
@@ -17,7 +17,7 @@
 
 var App = require('app');
 require('controllers/main/charts/heatmap_metrics/heatmap_metric');
-var date = require('utils/date');
+var date = require('utils/date/date');
 
 describe('MainChartHeatmapMetric', function () {
   var mainChartHeatmapMetric = App.MainChartHeatmapMetric.create({});

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/test/utils/date/date_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/date/date_test.js b/ambari-web/test/utils/date/date_test.js
new file mode 100644
index 0000000..630b3a8
--- /dev/null
+++ b/ambari-web/test/utils/date/date_test.js
@@ -0,0 +1,185 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var Ember = require('ember');
+var App = require('app');
+
+var validator = require('utils/validator');
+var date = require('utils/date/date');
+
+describe('date', function () {
+
+  var correct_tests = Em.A([
+    {t: 1349752195000, e: 'Tue, Oct 09, 2012 03:09', e2: 'Tue Oct 09 2012'},
+    {t: 1367752195000, e: 'Sun, May 05, 2013 11:09', e2: 'Sun May 05 2013'},
+    {t: 1369952195000, e: 'Thu, May 30, 2013 22:16', e2: 'Thu May 30 2013'}
+  ]);
+
+  var incorrect_tests = Em.A([
+    {t: null},
+    {t: ''},
+    {t: false},
+    {t: []},
+    {t: {}},
+    {t: undefined},
+    {t: function(){}}
+  ]);
+
+  describe('#dateFormatZeroFirst()', function() {
+    var tests = [
+      {
+        t: 2,
+        e: '02',
+        m: 'should convert to `02`'
+      },
+      {
+        t: 10,
+        e: '10',
+        m: 'should convert to `10`'
+      }
+    ];
+    tests.forEach(function(test) {
+      it(test.m, function() {
+        expect(date.dateFormatZeroFirst(test.t)).to.eql(test.e);
+      });
+    });
+  });
+
+  describe('#startTime()', function() {
+    var today = new Date();
+    var testDate = new Date(1349752195000);
+    var tests = [
+      { t: 1349752195000, e: testDate.toDateString() + ' {0}:{1}'.format(date.dateFormatZeroFirst(testDate.getHours()), date.dateFormatZeroFirst(testDate.getMinutes())) },
+      { t: -10000000, e: 'Not started' },
+      { t: today.getTime(), e: 'Today {0}:{1}'.format(date.dateFormatZeroFirst(today.getHours()), date.dateFormatZeroFirst(today.getMinutes())) },
+      { t: today, e: ''}
+    ];
+    tests.forEach(function(test) {
+      var testMessage = 'should convert {0} to {1}'.format(test.t, test.e);
+      it(testMessage, function() {
+        expect(date.startTime(test.t)).to.be.eql(test.e);
+      });
+    });
+  });
+
+  describe('#timingFormat', function() {
+    var tests = Em.A([
+      {i: '30', e:'30 ms'},
+      {i: '300', e:'300 ms'},
+      {i: '999', e:'999 ms'},
+      {i: '1000', e:'1.00 secs'},
+      {i: '3000', e:'3.00 secs'},
+      {i: '35000', e:'35.00 secs'},
+      {i: '350000', e:'350.00 secs'},
+      {i: '999999', e:'1000.00 secs'},
+      {i: '1000000', e:'16.67 mins'},
+      {i: '3500000', e:'58.33 mins'},
+      {i: '35000000', e:'9.72 hours'},
+      {i: '350000000', e:'4.05 days'},
+      {i: '3500000000', e:'40.51 days'},
+      {i: '35000000000', e:'405.09 days'}
+    ]);
+
+    describe('Correct data', function(){
+      tests.forEach(function(test) {
+        it(test.t, function() {
+          expect(date.timingFormat(test.i)).to.equal(test.e);
+        });
+      });
+    });
+
+    describe('Incorrect data', function(){
+      incorrect_tests.forEach(function(test) {
+        it(test.t, function() {
+          expect(date.timingFormat(test.t)).to.equal(null);
+        });
+      });
+    });
+
+  });
+
+  describe('#duration', function() {
+    var tests = Em.A([
+      {startTime: 1, endTime: 2, e: 1},
+      {startTime: 0, endTime: 2000, e: 0},
+      {startTime: 200, endTime: 0, e: 19800}
+    ]);
+
+    beforeEach(function() {
+      sinon.stub(App, 'dateTime', function () { return 20000; });
+    });
+
+    tests.forEach(function(test) {
+      it(test.startTime + ' ' + test.endTime, function() {
+        expect(date.duration(test.startTime, test.endTime)).to.equal(test.e);
+      });
+    });
+
+    afterEach(function() {
+      App.dateTime.restore();
+    });
+  });
+
+  describe('#durationSummary()', function() {
+    var tests = [
+      {
+        startTimestamp: 1349752195000,
+        endTimestamp: 1349752199000,
+        e: '4.00 secs'
+      },
+      {
+        startTimestamp: 1349752195000,
+        endTimestamp: 1367752195000,
+        e: '208.33 days'
+      },
+      {
+        startTimestamp: -10000000,
+        endTimestamp: 1367752195000,
+        e: Em.I18n.t('common.na')
+      },
+      {
+        startTimestamp: 1349752195000,
+        endTimestamp: -1,
+        stubbed: true,
+        e: '0 secs'
+      },
+      {
+        startTimestamp: 100000000,
+        endTimestamp: -1,
+        stubbed: true,
+        e: '19.00 secs'
+      }
+    ];
+
+    beforeEach(function() {
+      sinon.stub(App, 'dateTime', function () { return 100019000; });
+    });
+
+    tests.forEach(function(test) {
+      var testMessage = 'duration between {0} and {1} is {2}'.format(test.startTimestamp, test.endTimestamp, test.e) + (test.stubbed ? " App.dateTime() is stubbed" : "");
+      it(testMessage, function() {
+        expect(date.durationSummary(test.startTimestamp, test.endTimestamp)).to.be.eql(test.e);
+      });
+    });
+
+    afterEach(function() {
+      App.dateTime.restore();
+    });
+  });
+
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/test/utils/date/timezone_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/date/timezone_test.js b/ambari-web/test/utils/date/timezone_test.js
new file mode 100644
index 0000000..4b9027a
--- /dev/null
+++ b/ambari-web/test/utils/date/timezone_test.js
@@ -0,0 +1,175 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var timezoneUtils = require('utils/date/timezone');
+
+describe('timezoneUtils', function () {
+
+  describe('#_groupTimezones', function () {
+
+    var formattedTimezones = [
+      {utcOffset: 1, groupByKey: 1, formattedOffset: '+01:00', value: 'a/Aa', region: 'a', city: 'Aa'},
+      {utcOffset: 1, groupByKey: 1, formattedOffset: '+01:00', value: 'a/Bb', region: 'a', city: 'Bb'},
+      {utcOffset: 2, groupByKey: 2, formattedOffset: '+02:00', value: 'a/Cc', region: 'a', city: 'Cc'},
+      {utcOffset: 2, groupByKey: 2, formattedOffset: '+02:00', value: 'a/Dd', region: 'a', city: 'Dd'},
+      {utcOffset: 1, groupByKey: 1, formattedOffset: '+01:00', value: 'b/Ee', region: 'b', city: 'Ee'},
+      {utcOffset: 1, groupByKey: 1, formattedOffset: '+01:00', value: 'b/Ff', region: 'b', city: 'Ff'},
+      {utcOffset: 2, groupByKey: 2, formattedOffset: '+02:00', value: 'b/Gg', region: 'b', city: 'Gg'},
+      {utcOffset: 2, groupByKey: 2, formattedOffset: '+02:00', value: 'b/Hh', region: 'b', city: 'Hh'},
+      {utcOffset: 2, groupByKey: 2, formattedOffset: '+02:00', value: 'b/II', region: 'b', city: 'II'},
+      {utcOffset: 2, groupByKey: 2, formattedOffset: '+02:00', value: 'b', region: 'b', city: ''}
+    ];
+
+    before(function () {
+      this.result = timezoneUtils._groupTimezones(formattedTimezones);
+    });
+
+    it('should group to 4 groups', function () {
+      expect(this.result.length).to.equal(4);
+    });
+
+    it('UTCOffset should be [1,1,2,2]', function () {
+      expect(this.result.mapProperty('utcOffset')).to.eql([1, 1, 2, 2]);
+    });
+
+    it('should map regions and cities correctly', function () {
+      var expected = ['(UTC+01:00) a / Aa, Bb',
+      '(UTC+01:00) b / Ee, Ff',
+      '(UTC+02:00) a / Cc, Dd',
+      '(UTC+02:00) b / Gg, Hh'];
+      var values = this.result.mapProperty('value');
+      expect(values).to.eql(expected);
+      expect(values.join('')).to.not.contain('II');
+      expect(values.join('')).to.not.contain(', ,');
+    });
+
+  });
+
+  describe('#_parseTimezones', function () {
+
+    beforeEach(function () {
+      sinon.stub(timezoneUtils, 'getAllTimezoneNames').returns([
+        'Europe/Helsinki',
+        'Asia/Magadan',
+        'America/Lima'
+      ]);
+      sinon.stub(timezoneUtils, '_groupTimezones', function (list) {
+        return list;
+      });
+      this.result = timezoneUtils._parseTimezones();
+    });
+
+    afterEach(function () {
+      timezoneUtils.getAllTimezoneNames.restore();
+      timezoneUtils._groupTimezones.restore();
+    });
+
+    it('should sort by offset and name', function () {
+      expect(this.result.mapProperty('value')).to.eql(['America/Lima', 'Europe/Helsinki', 'Asia/Magadan']);
+    });
+
+    it('should split regions and cities', function () {
+      expect(this.result.mapProperty('region')).to.eql(['America', 'Europe', 'Asia']);
+      expect(this.result.mapProperty('city')).to.eql(['Lima', 'Helsinki', 'Magadan']);
+    });
+
+  });
+
+  describe('#getAllTimezoneNames', function () {
+
+    before(function () {
+      this.result = timezoneUtils.getAllTimezoneNames();
+    });
+
+    after(function () {
+      this.result = undefined;
+    });
+
+    it('timezone names are parsed', function () {
+      expect(this.result).to.have.length.above(0);
+    });
+
+    it('Etc/* are excluded', function () {
+      this.result.forEach(function (tz) {
+        expect(tz.indexOf('Etc/')).to.equal(-1);
+      });
+    });
+
+    it('Abbreviations are excluded', function () {
+      this.result.forEach(function (tz) {
+        expect(tz).to.not.equal(tz.toUpperCase());
+      });
+    });
+
+  });
+
+  describe('#detectUserTimezone', function () {
+
+    var getTimezoneOffset = Date.prototype.getTimezoneOffset;
+
+    function mockTimezoneOffset(jan, jul) {
+      Date.prototype.getTimezoneOffset = function () {
+        var month = this.getMonth();
+        if (month > 3 && month < 9) {
+          return -jul;
+        }
+        return -jan;
+      };
+    }
+
+    afterEach(function () {
+      Date.prototype.getTimezoneOffset = getTimezoneOffset;
+    });
+
+    it('Detect UTC+1', function () {
+      mockTimezoneOffset(0, 60);
+      var tz = timezoneUtils.detectUserTimezone();
+      expect(tz).to.contain('(UTC+01:00) Atlantic');
+    });
+
+    it('Detect UTC+1 for Europe', function () {
+      mockTimezoneOffset(0, 60);
+      var tz = timezoneUtils.detectUserTimezone('Europe');
+      expect(tz).to.contain('(UTC+01:00) Europe');
+      expect(tz).to.contain('London');
+    });
+
+    it('Detect UTC-4', function () {
+      mockTimezoneOffset(-300, -240);
+      var tz = timezoneUtils.detectUserTimezone();
+      expect(tz).to.contain('(UTC-04:00) America');
+      expect(tz).to.contain('New York');
+    });
+
+    it('Detect UTC+3 for Asia', function () {
+      mockTimezoneOffset(120, 180);
+      var tz = timezoneUtils.detectUserTimezone();
+      expect(tz).to.contain('(UTC+03:00) Asia');
+      expect(tz).to.contain('Damascus');
+    });
+
+    it('Detect UTC-7', function () {
+      mockTimezoneOffset(-480, -420);
+      var tz = timezoneUtils.detectUserTimezone();
+      expect(tz).to.contain('(UTC-07:00) America');
+      expect(tz).to.contain('Los Angeles');
+    });
+
+  });
+
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/test/utils/date_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/date_test.js b/ambari-web/test/utils/date_test.js
deleted file mode 100644
index 8e7167d..0000000
--- a/ambari-web/test/utils/date_test.js
+++ /dev/null
@@ -1,185 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var Ember = require('ember');
-var App = require('app');
-
-var validator = require('utils/validator');
-var date = require('utils/date');
-
-describe('date', function () {
-
-  var correct_tests = Em.A([
-    {t: 1349752195000, e: 'Tue, Oct 09, 2012 03:09', e2: 'Tue Oct 09 2012'},
-    {t: 1367752195000, e: 'Sun, May 05, 2013 11:09', e2: 'Sun May 05 2013'},
-    {t: 1369952195000, e: 'Thu, May 30, 2013 22:16', e2: 'Thu May 30 2013'}
-  ]);
-
-  var incorrect_tests = Em.A([
-    {t: null},
-    {t: ''},
-    {t: false},
-    {t: []},
-    {t: {}},
-    {t: undefined},
-    {t: function(){}}
-  ]);
-
-  describe('#dateFormatZeroFirst()', function() {
-    var tests = [
-      {
-        t: 2,
-        e: '02',
-        m: 'should convert to `02`'
-      },
-      {
-        t: 10,
-        e: '10',
-        m: 'should convert to `10`'
-      }
-    ];
-    tests.forEach(function(test) {
-      it(test.m, function() {
-        expect(date.dateFormatZeroFirst(test.t)).to.eql(test.e);
-      });
-    });
-  });
-
-  describe('#startTime()', function() {
-    var today = new Date();
-    var testDate = new Date(1349752195000);
-    var tests = [
-      { t: 1349752195000, e: testDate.toDateString() + ' {0}:{1}'.format(date.dateFormatZeroFirst(testDate.getHours()), date.dateFormatZeroFirst(testDate.getMinutes())) },
-      { t: -10000000, e: 'Not started' },
-      { t: today.getTime(), e: 'Today {0}:{1}'.format(date.dateFormatZeroFirst(today.getHours()), date.dateFormatZeroFirst(today.getMinutes())) },
-      { t: today, e: ''}
-    ];
-    tests.forEach(function(test) {
-      var testMessage = 'should convert {0} to {1}'.format(test.t, test.e);
-      it(testMessage, function() {
-        expect(date.startTime(test.t)).to.be.eql(test.e);
-      });
-    });
-  });
-
-  describe('#timingFormat', function() {
-    var tests = Em.A([
-      {i: '30', e:'30 ms'},
-      {i: '300', e:'300 ms'},
-      {i: '999', e:'999 ms'},
-      {i: '1000', e:'1.00 secs'},
-      {i: '3000', e:'3.00 secs'},
-      {i: '35000', e:'35.00 secs'},
-      {i: '350000', e:'350.00 secs'},
-      {i: '999999', e:'1000.00 secs'},
-      {i: '1000000', e:'16.67 mins'},
-      {i: '3500000', e:'58.33 mins'},
-      {i: '35000000', e:'9.72 hours'},
-      {i: '350000000', e:'4.05 days'},
-      {i: '3500000000', e:'40.51 days'},
-      {i: '35000000000', e:'405.09 days'}
-    ]);
-
-    describe('Correct data', function(){
-      tests.forEach(function(test) {
-        it(test.t, function() {
-          expect(date.timingFormat(test.i)).to.equal(test.e);
-        });
-      });
-    });
-
-    describe('Incorrect data', function(){
-      incorrect_tests.forEach(function(test) {
-        it(test.t, function() {
-          expect(date.timingFormat(test.t)).to.equal(null);
-        });
-      });
-    });
-
-  });
-
-  describe('#duration', function() {
-    var tests = Em.A([
-      {startTime: 1, endTime: 2, e: 1},
-      {startTime: 0, endTime: 2000, e: 0},
-      {startTime: 200, endTime: 0, e: 19800}
-    ]);
-
-    beforeEach(function() {
-      sinon.stub(App, 'dateTime', function () { return 20000; });
-    });
-
-    tests.forEach(function(test) {
-      it(test.startTime + ' ' + test.endTime, function() {
-        expect(date.duration(test.startTime, test.endTime)).to.equal(test.e);
-      });
-    });
-
-    afterEach(function() {
-      App.dateTime.restore();
-    });
-  });
-
-  describe('#durationSummary()', function() {
-    var tests = [
-      {
-        startTimestamp: 1349752195000,
-        endTimestamp: 1349752199000,
-        e: '4.00 secs'
-      },
-      {
-        startTimestamp: 1349752195000,
-        endTimestamp: 1367752195000,
-        e: '208.33 days'
-      },
-      {
-        startTimestamp: -10000000,
-        endTimestamp: 1367752195000,
-        e: Em.I18n.t('common.na')
-      },
-      {
-        startTimestamp: 1349752195000,
-        endTimestamp: -1,
-        stubbed: true,
-        e: '0 secs'
-      },
-      {
-        startTimestamp: 100000000,
-        endTimestamp: -1,
-        stubbed: true,
-        e: '19.00 secs'
-      }
-    ];
-
-    beforeEach(function() {
-      sinon.stub(App, 'dateTime', function () { return 100019000; });
-    });
-
-    tests.forEach(function(test) {
-      var testMessage = 'duration between {0} and {1} is {2}'.format(test.startTimestamp, test.endTimestamp, test.e) + (test.stubbed ? " App.dateTime() is stubbed" : "");
-      it(testMessage, function() {
-        expect(date.durationSummary(test.startTimestamp, test.endTimestamp)).to.be.eql(test.e);
-      });
-    });
-
-    afterEach(function() {
-      App.dateTime.restore();
-    });
-  });
-
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1361f71/ambari-web/test/views/common/chart/linear_time_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/chart/linear_time_test.js b/ambari-web/test/views/common/chart/linear_time_test.js
index 74ea89c..0d4b200 100644
--- a/ambari-web/test/views/common/chart/linear_time_test.js
+++ b/ambari-web/test/views/common/chart/linear_time_test.js
@@ -30,7 +30,7 @@ describe('App.ChartLinearTimeView', function () {
     beforeEach(function () {
       var data = [[1, 1200000000], [2, 1200000000], [3, 1200000000]];
       var name = 'abc';
-      sinon.stub(App.router, 'get').withArgs('userSettingsController.userSettings.timezone').returns('Canada/Atlantic');
+      sinon.stub(App.router, 'get').withArgs('userSettingsController.userSettings.timezone').returns('(UTC+00:00) Greenwich');
       result = chartLinearTimeView.transformData(data, name);
     });