Tuesday, August 18, 2009

List of countries and timezones

I'm pasting a csv file containing a list of timezone data of some of the cities from timeanddate.com. I was unable to find such a list and eventually had to do a lot of manual work. Do comment if there are any errors.


Afghanistan - Kabul,Asia/Kabul,Afghanistan Time,UTC/GMT +4:30
Algeria - Algiers,Africa/Algiers,Central European Time,UTC/GMT +1:00
Argentina - Buenos Aires,America/Argentina/Buenos_Aires,Argentine Time,UTC/GMT -3:00
Australia - Australian Capital Territory - Canberra,Australia/Canberra,Eastern Standard Time (New South Wales),UTC/GMT +10:00
Australia - New South Wales - Sydney,Australia/Sydney,Eastern Standard Time (New South Wales),UTC/GMT +10:00
Australia - Northern Territory - Darwin,Australia/Darwin,Central Standard Time (Northern Territory),UTC/GMT +9:30
Australia - Queensland - Brisbane,Australia/Brisbane,Eastern Standard Time (Queensland),UTC/GMT +10:00
Australia - South Australia - Adelaide,Australia/Adelaide,Central Standard Time (South Australia),UTC/GMT +9:30
Australia - Victoria - Melbourne,Australia/Melbourne,Eastern Standard Time (Victoria),UTC/GMT +10:00
Australia - Western Australia - Perth,Australia/Perth,Western Standard Time (Australia),UTC/GMT +8:00
Austria - Vienna,Europe/Vienna,Central European Time,UTC/GMT +1:00
Bahamas - Nassau,America/Nassau,Eastern Standard Time,UTC/GMT -5:00
Bangladesh - Dhaka,Asia/Dhaka,Bangladesh Time,UTC/GMT +6:00
Belarus - Minsk,Europe/Minsk,Eastern European Time,UTC/GMT +2:00
Belgium - Brussels,Europe/Brussels,Central European Time,UTC/GMT +1:00
Bolivia - La Paz,America/La_Paz,Bolivia Time,UTC/GMT -4:00
Brazil - São Paulo - Sao Paulo,America/Sao_Paulo,Brasilia Time,UTC/GMT -3:00
Bulgaria - Sofia,Europe/Sofia,Eastern European Time,UTC/GMT +2:00
Canada - Alberta - Edmonton,America/Edmonton,Mountain Standard Time,UTC/GMT -7:00
Canada - British Columbia - Vancouver,America/Vancouver,Pacific Standard Time,UTC/GMT -8:00
Canada - Manitoba - Winnipeg,America/Winnipeg,Central Standard Time,UTC/GMT -6:00
Canada - Newfoundland and Labrador - St. John's,America/St_Johns,Newfoundland Standard Time,UTC/GMT -3:30
Canada - Nova Scotia - Halifax,America/Halifax,Atlantic Standard Time,UTC/GMT -4:00
Canada - Ontario - Toronto,America/Toronto,Eastern Standard Time,UTC/GMT -5:00
Canada - Quebec - Montreal,America/Montreal,Eastern Standard Time,UTC/GMT -5:00
Chile - Santiago,America/Santiago,Chile Time,UTC/GMT -4:00
China - Shanghai,Asia/Shanghai,China Standard Time,UTC/GMT +8:00
Colombia - Bogota,America/Bogota,Colombia Time,UTC/GMT -5:00
Croatia - Zagreb,Europe/Zagreb,Central European Time,UTC/GMT +1:00
Cuba - Havana,America/Havana,Cuba Standard Time,UTC/GMT -5:00
Czech Republic - Prague,Europe/Prague,Central European Time,UTC/GMT +1:00
Denmark - Copenhagen,Europe/Copenhagen,Central European Time,UTC/GMT +1:00
Dominican Republic - Santo Domingo,America/Santo_Domingo,Atlantic Standard Time,UTC/GMT -4:00
Egypt - Cairo,Africa/Cairo,Eastern European Time,UTC/GMT +2:00
El Salvador - San Salvador,America/El_Salvador,Central Standard Time,UTC/GMT -6:00
Estonia - Tallinn,Europe/Tallinn,Eastern European Time,UTC/GMT +2:00
Ethiopia - Addis Ababa,Africa/Addis_Ababa,Eastern African Time,UTC/GMT +3:00
Fiji - Suva,Pacific/Fiji,Fiji Time,UTC/GMT +12:00
Finland - Helsinki,Europe/Helsinki,Eastern European Time,UTC/GMT +2:00
France - Paris,Europe/Paris,Central European Time,UTC/GMT +1:00
Germany - Berlin - Berlin,Europe/Berlin,Central European Time,UTC/GMT +1:00
Greece - Athens,Europe/Athens,Eastern European Time,UTC/GMT +2:00
Guatemala - Guatemala,America/Guatemala,Central Standard Time,UTC/GMT -6:00
Honduras - Tegucigalpa,America/Tegucigalpa,Central Standard Time,UTC/GMT -6:00
Hong Kong - Hong Kong,Asia/Hong_Kong,Hong Kong Time,UTC/GMT +8:00
Hungary - Budapest,Europe/Budapest,Central European Time,UTC/GMT +1:00
Iceland - Reykjavik,Atlantic/Reykjavik,Greenwich Mean Time,UTC/GMT +0:00
India - Delhi - New Delhi,Asia/Kolkata,India Standard Time,UTC/GMT +5:30
India - Maharashtra - Mumbai,Asia/Kolkata,India Standard Time,UTC/GMT +5:30
India - West Bengal - Kolkata,Asia/Kolkata,India Standard Time,UTC/GMT +5:30
Indonesia - Java - Jakarta,Asia/Jakarta,West Indonesia Time,UTC/GMT +7:00
Iran - Tehran,Asia/Tehran,Iran Standard Time,UTC/GMT +3:30
Iraq - Baghdad,Asia/Baghdad,Arabia Standard Time,UTC/GMT +3:00
Ireland - Dublin,Europe/Dublin,Greenwich Mean Time,UTC/GMT +0:00
Israel - Jerusalem,Asia/Jerusalem,Israel Standard Time,UTC/GMT +2:00
Italy - Rome,Europe/Rome,Central European Time,UTC/GMT +1:00
Jamaica - Kingston,America/Jamaica,Eastern Standard Time,UTC/GMT -5:00
Japan - Tokyo,Asia/Tokyo,Japan Standard Time,UTC/GMT +9:00
Jordan - Amman,Asia/Amman,Eastern European Time,UTC/GMT +2:00
Kazakstan - Almaty,Asia/Almaty,Alma-Ata Time,UTC/GMT +6:00
Kenya - Nairobi,Africa/Nairobi,Eastern African Time,UTC/GMT +3:00
Kiribati - Christmas Island - Kiritimati,Pacific/Kiritimati,Line Is. Time,UTC/GMT +14:00
Kuwait - Kuwait City,Asia/Kuwait,Arabia Standard Time,UTC/GMT +3:00
Lebanon - Beirut,Asia/Beirut,Eastern European Time,UTC/GMT +2:00
Madagascar - Antananarivo,Indian/Antananarivo,Eastern African Time,UTC/GMT +3:00
Malaysia - Kuala Lumpur,Asia/Kuala_Lumpur,Malaysia Time,UTC/GMT +8:00
Mexico - Federal District - Mexico City,America/Mexico_City,Central Standard Time,UTC/GMT -6:00
Morocco - Casablanca,Africa/Casablanca,Western European Time,UTC/GMT +0:00
Myanmar - Yangon,Asia/Rangoon,Myanmar Time,UTC/GMT +6:30
Nepal - Kathmandu,Asia/Kathmandu,GMT+05:45,UTC/GMT +5:45
Netherlands - Amsterdam,Europe/Amsterdam,Central European Time,UTC/GMT +1:00
New Zealand - Auckland,Pacific/Auckland,New Zealand Standard Time,UTC/GMT +12:00
New Zealand - Chatham Islands,Pacific/Chatham,Chatham Standard Time,UTC/GMT +12:45
Nicaragua - Managua,America/Managua,Central Standard Time,UTC/GMT -6:00
Nigeria - Lagos,Africa/Lagos,Western African Time,UTC/GMT +1:00
Norway - Oslo,Europe/Oslo,Central European Time,UTC/GMT +1:00
Pakistan - Karachi,Asia/Karachi,Pakistan Time,UTC/GMT +5:00
Paraguay - Asuncion,America/Asuncion,Paraguay Time,UTC/GMT -4:00
Peru - Lima - Lima,America/Lima,Peru Time,UTC/GMT -5:00
Philippines - Manila,Asia/Manila,Philippines Time,UTC/GMT +8:00
Poland - Warsaw,Europe/Warsaw,Central European Time,UTC/GMT +1:00
Portugal - Lisbon,Europe/Lisbon,Western European Time,UTC/GMT +0:00
Puerto Rico - San Juan,America/Argentina/San_Juan,Argentine Time,UTC/GMT -3:00
Romania - Bucharest,Europe/Bucharest,Eastern European Time,UTC/GMT +2:00
Russia - Anadyr,Asia/Anadyr,Anadyr Time,UTC/GMT +12:00
Russia - Kamchatka,Asia/Kamchatka,Petropavlovsk-Kamchatski Time,UTC/GMT +12:00
Russia - Moscow,Europe/Moscow,Moscow Standard Time,UTC/GMT +3:00
Russia - Vladivostok,Asia/Vladivostok,Vladivostok Time,UTC/GMT +10:00
Saudi Arabia - Riyadh,Asia/Riyadh,Arabia Standard Time,UTC/GMT +3:00
Serbia - Belgrade,Europe/Belgrade,Central European Time,UTC/GMT +1:00
Singapore - Singapore,Asia/Singapore,Singapore Time,UTC/GMT +8:00
South Africa - Johannesburg,Africa/Johannesburg,South Africa Standard Time,UTC/GMT +2:00
South Korea - Seoul,Asia/Seoul,Korea Standard Time,UTC/GMT +9:00
Spain - Madrid,Europe/Madrid,Central European Time,UTC/GMT +1:00
Sudan - Khartoum,Africa/Khartoum,Eastern African Time,UTC/GMT +3:00
Sweden - Stockholm,Europe/Stockholm,Central European Time,UTC/GMT +1:00
Switzerland - Zurich,Europe/Zurich,Central European Time,UTC/GMT +1:00
Taiwan - Taipei,Asia/Taipei,China Standard Time,UTC/GMT +8:00
Thailand - Bangkok,Asia/Bangkok,Indochina Time,UTC/GMT +7:00
Turkey - Ankara,Turkey,Eastern European Time,UTC/GMT +2:00
Turkey - Istanbul,Turkey,Eastern European Time,UTC/GMT +2:00
U.K. - England - London,Europe/London,Greenwich Mean Time,UTC/GMT +0:00
United Arab Emirates - Dubai - Dubai,Asia/Dubai,Gulf Standard Time,UTC/GMT +4:00
Uruguay - Montevideo,America/Montevideo,Uruguay Time,UTC/GMT -3:00
U.S.A. - Alaska - Anchorage,America/Anchorage,Alaska Standard Time,UTC/GMT -9:00
U.S.A. - California - Los Angeles,America/Los_Angeles,Pacific Standard Time,UTC/GMT -8:00
U.S.A. - Colorado - Denver,America/Denver,Mountain Standard Time,UTC/GMT -7:00
U.S.A. - Hawaii - Honolulu,Pacific/Honolulu,Hawaii Standard Time,UTC/GMT -10:00
U.S.A. - Illinois - Chicago,America/Chicago,Central Standard Time,UTC/GMT -6:00
U.S.A. - Michigan - Detroit,America/Detroit,Eastern Standard Time,UTC/GMT -5:00
U.S.A. - New York - New York,America/New_York,Eastern Standard Time,UTC/GMT -5:00
Uzbekistan - Tashkent,Asia/Tashkent,Uzbekistan Time,UTC/GMT +5:00
Venezuela - Caracas,America/Caracas,Venezuela Time,UTC/GMT -4:30
Vietnam - Hanoi,Asia/Vientiane,Indochina Time,UTC/GMT +7:00
Yemen - Aden,Asia/Aden,Arabia Standard Time,UTC/GMT +3:00
Zimbabwe - Harare,Africa/Harare,Central African Time,UTC/GMT +2:00

Friday, August 07, 2009

Flex

I had an opportunity to look into Flex a few weeks back. I've been mostly focused on Swing last couple of years and before that was fairly involved with web development (pre-ajax). So it's been a nice exercise to investigate what it offers and compare and contrast.

Flex has a good out of the box widget set, similar to Swing. One of its major strengths is its UI designer - no real surprise there, given it grew out of flash. Actionscript, the ECMAScript compliant language, tries to be dynamic with optional static typing. This can be useful, especially during at development time with code completion. Debugging can be a challenge though, especially the mix between actionscript and mxml. End up falling back on Alerts which isn't the greatest thing (more so given that they don't block and you can end up with a flurry of alert boxes). I also found that there are multiple ways to do the same thing. This can be quite confusing especially when looking at samples on the web. You don't really know which is the best way or why. One other small thing - event names don't follow "on[event_name]" convention... it's very easy to confuse them with attributes in mxml. Overall, there's a big similarity with the html/js/css style of development - mxml/as/css.

Flex demos really well. For creating small simple apps involving fetching data from a remote data source and rendering it, it is probably unrivaled from a productivity perspective. Drag a datagrid onto the canvas, construct an http service and attach a result event handler to bind the result to the datagrid. Simple. Done. I think the 'Bindable' attribute is a big part of why Flex is so successful for these types of apps. It takes care of all that plumbing of syncing model with view. It's interesting to note that JavaFX has introduced the 'bind' keyword in JavaFX Script.

Most of what I've come across - articles/examples deal with small apps. I'm interested in how development in Flex would scale. It can be double edged sword. Given that it is so simple to just drag/drop and attach handlers, I would think it would require more discipline and good coding practices. It would be all too easy to keep doing this all over without really giving much thought to overall design and code hygiene. I don't particularly like the script tag in the MXML file. There should've been strict separation between the .mxml file and the .as file. I understand this was probably done to emulate the html/js model but why not force the separation as with separate .js files.

Running a fairly complicated app - like TourDeFlex which chronicles the wonders of the various flex widgets - sucks up a lot of resources. Usability suffers. The experience feels sluggish. A similarly "heavy" "ajaxy" app doesn't. What's worse is that on more than one occasion, the browser has crashed running that demo. It's no surprise I haven't seen full fledged flex apps out on the 'open web'. Enterprises can, and have, embraced it since they can dictate the environment.

There's a lot of revival in interest in web standards. Just as Adobe has AIR, Microsoft has Silverlight and Sun/Oracle has JavaFX, Google is embracing and evangelizing open web standards - HTML5/CSS/Javascript - as their RIA platform. GWT is the browser independent development platform with generated Javascript as the bytecode. I've started playing around with GWT recently and am quite impressed with its abilities - especially the development environment/cycle. Version 2.0 promises more useful features.

It'll be interesting to see where these platforms end up 3-4 years from now.