« The importance of your user interface metaphor. | Main | I must be missing something »

The Dating Game

Working with legacy code can present some, um, interesting challenges. I just hit a wonderful issue to do with dates and timezones, caused by a really piss-poor data model.

The code I was looking at was comparing two maps, both keyed by date. The problem was that the system was never designed for international use, so while one map (the one coming in from the UI) was correctly mapped to the right time zone, the other (from the server) wasn't. So, naturally, the code didn't think that the two collections had anything in common. Ouch.

What makes it really bad is that, apparently, the data model (part of the legacy, and not ammenable to change at the moment) understands about time zones. That is, it "understands" that each country has one. And only one. Considering that just in Australia, we have three (four if you include the Daylight Savings Time split), this isn't really understandable at all.

Post a comment


About

This page contains a single entry from the blog posted on February 7, 2005 1:13 PM.

The previous post in this blog was The importance of your user interface metaphor..

The next post in this blog is I must be missing something.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.35