About the author

Steven HarmanSteven Harman is a passionate developer who believes that writing great software isn't just a job, its a craft.

ASP.NET MVP

For recent posts and more about me, scroll to the bottom.

Subscribe

  • Subscribe to my feed. via RSS
  • Subscribe via email via email

Jobs

Badges

  • Subtext Project
  • Support Subtext
  • HiddenNetwork.com Banner

Hotfix KB928388 - Revised Daylight Savings Time

Time Zones Today I was merging the Subtext 1.9 branch back into the trunk in our SVN repository and I came across an interesting "Gottcha" to keep in your back pocket - Microsoft has changed the Time Zone settings with the fix for KB928388.

The Back Story

One of the great things that Subtext has going for it (from a developer's perspective) is our great suite of Unit tests. At the time of this writing we were up around 39% code coverage. So, being the contentious developer that I am, after I merged the branch into trunk and cleaned up any conflicts, I ran our Unit Test suite.

My initial run of the tests resulted in over 130 failed tests... WTF? I quickly realized that I had forgot to upgrade my database to work with the latest code - so I ran the upgrade scripts and stored procedure script and I was back in business. On the next run I still had over 100 failing tests. Time to start debugging.

Failing TimeZone tests?

This particular TestFixture was aimed at testing

a specialization of the abstract TimeZone class that implements time zones based in the time zone information found in Windows.

Phil wrote this specialized abstraction for some very cool TimeZone work that he did a while ago... and then added it to Subtext! If you want to see more, take a look at the Subtext.Framework.Util.WindowsTimeZone class.

At any rate, the first test that I took a look at was the TimeZoneTest.CanGetById test. This test uses MbUnit's RowTest Attribute which allows you to pass in a series of test criteria and expected values. For this test we were trying to make sure that we could find the correct WindowsTimeZone object when searching for it by it's Id. To make sure we found the correct one, we were testing several of it's Properties against our passed in Expected Values.

One of the Expected Values we were testing was the DisplayName. For this test, we were testing with the Pacific Standard Time Zone - for which we were expecting a Display Name of (GMT-08:00) Pacific Time (US & Canada); Tijuana. We expected wrong!

The fix broke us

At first I didn't understand why this test was busted... it was working just fine on our CI server, but was utterly broken on my machine. Looking in SVN, I had made no changes to the WindowsTimeZone class, nor the test fixture. I was about to start pounding my head against the wall when all of the sudden then I remembered something... a Windows Update fix that I had applied to my machine earlier that week.

I didn't remember the exact fix number, but for some reason I had read the description prior to installing it and knew that it had something to do with the new time zone laws that go into effect for the U.S. in Spring 2007. I logged into the build server, and went to the Windows Update site... and there it was. The fix for KB928388.

If you take a look about half way down the page you'll see a section called "DTS and time zone settings." That's the area that we're interested in. Look for the row with a Registry subkey name of Pacific Standard Time, 5th from the bottom.

Now, if you look at the Display Name column you'll see the problem. With this fix the Display Name for that time zone has changed. Basically they just dropped the Tijuana off the end - but that is more than enough to make our unit test fail!

A Quick Fix

I adjusted the unit test to look for the new DisplayName and like magic, that test went GREEN! My next step was to install the fix on the CI Server so that it wouldn't choke on the modified unit test.

I'd advise everyone to go ahead and install this fix as you'll need it this Spring anyhow... and if you put it on your machine now you might just find a few quirks like this one!

Happy Testing!

Technorati tags: , , , ,

What others are saying.

# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar vern
Dec 18, 2006
I'd advise everyone to go ahead and install this fix as you'll need it this Spring anyhow...

HAHAHAHA! I laugh in your general direction!

Daylight Savings Time?!? How quaint!

Have I mentioned how much I love Arizona?

Daylight Savings Time... Indeed!
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Steve Harman
Dec 18, 2006
Well Vern... I can't let you go that easy. While you my live in an area that doesn't do Daylight Savings, that doesn't mean that at some point your PC won't need to do a time calculation for another time zone - perhaps Pacific or Eastern Standard for example which does use it.

Without this patch, your PC will incorrectly calculate the time during those extra few weeks of Daylight Savings. So good luck with that.
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar vern
Dec 19, 2006
Yeah, I figured I'd get called out on that one.

And you're right, my PC will do that stuff.

As my in-laws all live in CA and I travel there (more) frequently (than I want to) I use Outlook's ability to have multiple time zones defined for appointments.

Stupid Daylight Savings Time!
# Hotfix KB928388 - Revised Daylight Savings Time
Gravatar DotNetKicks.com
Dec 20, 2006
You've been kicked (a good thing) - Trackback from DotNetKicks.com
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Lats
Jan 26, 2007
Green light? Is there a utility available to test this without going through the registry files?
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Steve Harman
Jan 26, 2007
@Lats: I'm not sure I follow, can you elaborate?
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Yo Mama
Jan 29, 2007
Good News: Our tester had a test machine already past the spring date and installed the patch to test the fall date. They found the date was set back correctly.

Bad News: They found that it would not advance past 2am - ever. Groundhogs Day in action!

They're going back to install the patch before spring and test again. Don't have time to go back and retest their issue, but I'm wondering if there really might be a problem for anyone that doesn't update before spring!?!
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Steve Harman
Jan 31, 2007
@Yo Mamma: I would imagine that Microsoft will up the priority of this patch as we get closer to the new DLS date for 2007. Once it becomes a Critical Patch, it will hypothetically be pushed out the a large majority of the Windows installations out there.

Of course what will actually happens remains to be seen. Either way, thanks for the feedback and the forewarning!
# KB928388 Breaking Tests with Windows DST TimeZone Patch and Past Dates
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Lee Simpson
Feb 16, 2007
Has anyone noticed an issue after installing the KB928388 patch where the timezone changes in our case from Central Time to a timezone in Sarajevo? It has happened on about 1 of every 8 computers I have pushed this patch to. It comes back after a reboot on a few of them.
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Steve Harman
Feb 16, 2007
@Lee: That certainly sounds odd... perhaps it is a bug? The more I hear/read about this patch the more I feel like it was rushed out the door without full and proper testing.

You might want to look into the KB article and see if anyone else is reporting similar issues.

Good luck, and thanks for the heads up!
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Roger Waddell
Feb 24, 2007
Lee and Steve. We have several PCs exhibiting the same issue as Lee describes, Central Time zone changes to Sarajevo. Any luck finding the fix for this? If so, please e-mail me at roger_waddell@mohawkind.com.
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Paul
Feb 27, 2007
Should the Hotfix being applied here be 931836? When reading the MS site relative to the 928388 fix there is an indication that the 931836 has superceded the 928388.
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Marilyn
Mar 01, 2007
We are experiencing the Sarajevo problem here in Milwaukee County as well. We are using the 931836 patch. I haven't been able to find anything on the IBM website about the timezone problem, so any additional information would be appreciated.
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Bryan
Mar 05, 2007
Those of you that have the Sarajevo issue, do you have Lotus Notes on those machines?

Bryan
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Steve Harman
Mar 05, 2007
*shudder*... I loath Lotus Notes.

Luckily I haven't had to use it since I left my last "big corporate" gig several months ago. Although, I have to admit that I've missed some of it's smartness.
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Umesh Chohan
Mar 06, 2007
We've had simialr issues but we are based in London GMT and had times set to Ekaterinburg which is +5 GMT (sarajevo is 5+ Pacific) after installingthe patch. We run Notes too.
PLease let me know if you have any info reagrding a fix.

thanks
Umesh
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Bryan
Mar 06, 2007
The issue with the Windows Time Zone being set incorrectly AFTER the DST fix has been applied is due to Lotus Notes!!! IBM has documented this issue: here and here.
In most cases, the user's Location document setting "Use operating system's time zone settings" will work as expected whether set to "Yes" or "No".

Note: A few customers have reported issues where the time zone for Notes and the Windows operating system are reset to an unexpected value when the setting is "No". This has been observed in cases where the Windows update was distributed in an automated rollout while Notes is running.

It's best to ensure Notes is not running when applying the DST patch!
# re: Hotfix KB928388 - Revised Daylight Savings Time
Gravatar Steve Harman
Mar 06, 2007
@Bryan: Thanks so much for the update... I'm sure this info will be most useful!
Comments have been closed on this topic.