Cool Hack Memories: Server-Time, PC Time and Indiana
Via Shelley Powers's blog, I see a link to another blog that mentions Indiana changed to Daylight Savings Times this year.
And it brings up a memory of one of my favorite hacks I had to do in a former job.
See the software we made was being hosted by a unviersity which was serving students from across the great state of Indiana.
However, during part of the year when most of Indiana ignored DST, the
corner of Indiana near Chicago, Illinois, SWITCHED to DST. This was
because most of their residents actually worked in Chicago, thus it was
easier to integrate with that community than to deal with the rest of
the state (reminding us, even to this die in the Longhorn - Texan, that
all of our geography is just arbitrary).
So what would happen is that students who lived in that part of the
state would suddenly start turn in assignments late or miss the start
of an exam because their PCs would be on their own correct local time,
while the server was on the correct local time there.
What I was then tasked to do was to come up with SOMETHING that would help alleviate some of this suffering.
Well - I couldn't very well fix the server time. That was a big enough
problem that it was going to take some radical re-thinking of the
various time sensitive tools (such as the course calendar and
quiz/assignment tools). Plus I was in the professional services group
and not development. So I was limited to the external bits of the
system.
What I did do was build a Servlet that wrote out a HTML page that
initialized a Java applet with the server time. The applet then
detected what time it was on the local PC. And then it told you how far
off you were so that you could adjust the time of your tests.
It didn't completely solve the problem, but it did help.
I also learned during the testing to account for the half-hour time-zones like the one in Australia. :)
Lessons Learned:
When building a community-based application that has any type of time
dependicies in it - to make sure you account for differences in server
and local time.