Argentina and the World Clock Dashboard Widget

As you might know, Argentina has changed its timezone today from GMT-4 GMT-3 to GMT-2; as a result, Apple’s World Clock dashboard widget does not (currently) show the correct time for our preferred tango+asado+soccer city.

This happens because the code of this widget calls the “TimeZoneInfo.currentTimeForTimeZone” method (line 582 of the World Clock.js file), which is provided by the runtime, and thus you have to wait until Apple provides a fix for it (please correct me if I’m wrong!).

Since Dashboard Widgets are JavaScript-based, I’ve copied it and created a new one with a small fix in lines 18 and 581 of the World Clock.js file, which makes it show the correct time for my birth city. Of course, this will change in March (when Buenos Aires falls back from GMT-2 to GMT-3) so you might want to fall back to the default World Clock widget when that happens (or when Apple fixes the time zone information in Mac OS X).

You can download the widget! As always, I’m not responsible of any problem it might bring to your system (in mine it works fine though!).

Before and after:

before.png after.png

This was effectively my first time dealing with Dashboard Widgets (something I wanted to do for some time…) I hope to create a real one soon!