Daylight Savings Time! These three words are strong enough to disarrange your PDC and time hierarchy in Active Directory environment, especially when it comes to countries like Iran, where there is no update related to DST time zone since 2009. If you still not concerned about what the real problem is I will clarify it in a moment. 

Many countries advance their clock for 1 hour at very first day of the spring. Considering this concept, people simply get up in the morning at first day of the spring and set their clock. For Iran, every year, clocks will be advanced by 1 hour in 29th of Esfand ( The last day of winter), but Microsoft is not aware of when the 29th of Esfand is. Look at the below screen shot:

It says the DST will be started at “Sunday, March 16, 2014” and clocks will be advanced for 1 hour. But since 2009 this date has not changed and as a matter of fact “Sunday, March 16, 2014” is not 29th of Esfand. It is 25th of Esfand, so this date is four days behind. If you look at your native calendar (Persian - Islamic – Japanese - …) you will notice the different. Look at table below:

Windows Calendar

Persian calendar

March 16

Is equal to

Esfand 25

March 20

Is equal to

Esfand 29

As we are in 2014, if I let this “Sunday, March 16, 2014” to be the source DST the clocks will go forward at Esfand 25 which is four days behind as I mentioned previously. These four days are lengthy enough to ruin your native applications and raise problems in your environment.

 So what you should do is to create your custom DST and apply it to Windows systems. You have to reconfigure DST time via registry editor and set “March 20” or other suitable date depending on your calendar. By modifying the DST in your system you can configure DST start time to a suitable date according to your needs. In this case we will change it to March 20 which is equal to 29th of Esfand.

What you will need in order to overcome this problem are as follows:
1. A test environment.

2. Registry Editor

3. A tool called tzedit where you can download it from here.

4. A Native calendar (For converting dates)

5. A National calendar (For converting dates)

Now let’s move for the solution.

Firstly login to a computer (preferably Windows 7) with administrative credentials and run tzedit tool. You will see below window. Select your time zone and notice the Start Date/Time value. We want to reconfigure it to 20th of March. Now click Edit and you will be redirected to edit time zone window.

Since DST configuration works with weekday names you have to take a look at the calendar and see which day is 20th of March. In this case it is equal to Thursday. Next step is to check which Thursday of the month is equal to 20th of March. Is it first, second or third? Grab your calendar and verify it. For 2014, third Thursday of March is equal to 20th of March. So configure the settings and click OK.

What you have to do now is to navigate to HKLM\Software\Microsoft\Windows NT\CurrentVersion\Time Zone\Iran Standard Time and open TZI registry key.

For now copy the value of TZI key.

Next step is to re-navigate to HKLM\Software\Microsoft\Windows NT\CurrentVersion\Time Zone\Iran Standard Time\Dynamic DST and create a new REG_BINARY key and name it 2014. It is time to paste the code from previous step. Open 2014 (newly created) and right click and select Paste

Now you should restart the system for the changes being applied and open up your Time Zone to see the result.

Since the problem has been fixed you can export the key as a .reg file and apply it to other clients using logon script via GPO. Finally your PDC hierarchy will be synced with the correct DST format.

Do not forget to test this method in a test environment and then move it to the whole forest. 

Hope it helps.

Mahdi Tehrani