Daylight Saving Time change in Chile – How to update Windows Server and Desktop operating systems
Background
The government of Chile announced last February 07th 2008 that their current daylight saving time will be extended in order to save energy. The new fall back date for the daylight saving period of 2007-2008 is:
- Daylight saving time ends: Saturday, March 29th, 2008 11:59:59 PM
Currently, computers in Chile use the “(GMT-04:00) Santiago” time zone setting. The default configuration for this time zone setting in Windows Operating Systems does not reflect the new final date for the daylight saving time defined by the government.
How to update Windows Servers and Desktop Operating Systems
At the time of writing this post, there is no hotfix available to update Windows Operating Systems with the new DST dates for Chile.
The procedures described below are based on KB 914387, which at the time of writing this post, does not contain information about the new DST settings for Chile. If you are in doubt about these procedures, consult the article for more details.
Updating Windows Servers and Desktop Operating Systems
This procedure shows how to update the definition for “(GMT-04:00) Santiago” time zone to reflect the DST dates defined by the Chilean government.
Daylight saving time begins: Second Saturday of October at 11:59:59 PM
Daylight saving time ends: Last Saturday of March at 11:59:59 PM
1. Create a registry file that contains the new DST settings for Chile, following the steps below:
a. Click Start, click Run, type notepad, and then click OK.
b. Copy the following registry information, and then paste it into the Notepad document:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time]"TZI"=hex:f0,00,00,00,00,00,00,00,c4,ff,ff,ff,00,00,03,00,06,00,05,00,17,00,3b,\ 00,3b,00,00,00,00,00,0a,00,06,00,02,00,17,00,3b,00,3b,00,00,00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time\Dynamic DST]"FirstEntry"=dword:000007d7"LastEntry"=dword:000007d8"2008"=hex:f0,00,00,00,00,00,00,00,c4,ff,ff,ff,00,00,03,00,06,00,05,00,17,00,3b,\ 00,3b,00,00,00,00,00,0a,00,06,00,02,00,17,00,3b,00,3b,00,00,00"2007"=hex:f0,00,00,00,00,00,00,00,c4,ff,ff,ff,00,00,03,00,06,00,02,00,17,00,3b,\ 00,3b,00,e7,03,00,00,0a,00,06,00,02,00,17,00,3b,00,3b,00,e7,03 |
c. On the File menu, click Save As.
d. Select a destination, and then type TZupdate.reg in the File name box.
e. In the Save as type box, click All Files, and then click Save.
2. Import this registry key on target machines by double clicking in the TZupdate.reg and clicking ‘Yes’ when prompted. All machines (clients and servers) must be updated with this registry information.
Note: The user must have administrative privileges to import the registry key. If the user does not have administrative privileges, then distribute the registry key via startup script as described on the session ‘Deploying the DST modifications using Group Policy’ below.
a. After you import the registry keys, you will need to refresh the configuration by either running the command:
control.exe timedate.cpl,,/Z Pacific SA Standard Time
or making a temporary change in the Date and Time properties (for example, uncheck/apply, then check/apply the “Automatically adjust clock for daylight saving changes”).
b. The script provide in step 3 already refreshes the DST configuration. You do not need to manually refresh the DST information if run the script.
3. In order to deploy these time zone changes in a corporate environment, you can use a startup script as described below.
Time zone information is stored in two locations. We need to make sure these locations are updated. Importing the TZupdate.reg file updates the time zone database in the registry. Next, you must create a script that updates the time zone information registry key in the CurrentControlSet branch. You can deploy this script by using Group Policy or another deployment mechanism.
The script identifies the current time zone of the client computer and then reloads the Time Zone Information registry key with the updated information from the time zone database. Then, the script writes an event to the Application log of the client computer where the script was run.
To create the script file, follow these steps.
a. Click Start, click Run, type notepad, and then press ENTER.
b. Copy the following code, and then paste it into the Notepad document.
Set objSh = CreateObject("WScript.Shell") 'Get the StandardName key of the current time zoneszStandardName = objSh.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\StandardName") 'Enumerate the subkeys in the time zone databaseconst HKEY_LOCAL_MACHINE = &H80000002Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")szTzsKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones"objReg.EnumKey HKEY_LOCAL_MACHINE, szTzsKeyPath, arrTzSubKeys 'Step through the time zones to find the matching Standard NameszTzKey = "<Unknown>"For Each subkey In arrTzSubKeys If (objSh.RegRead("HKLM\" & szTzsKeyPath & "\" & subkey & "\Std") = szStandardName) Then 'Found matching StandardName, now store this time zone key name szTzKey = subkey End IfNext If szTzKey = "<Unknown>" Then 'Write entry to the Application event log stating that the update has failed to execute objSh.LogEvent 1, "DST 2007 Registry Update and Refresh failed to execute on this computer. Time zones failed to enumerate properly or matching time zone not found." Wscript.Quit 0End If Dim process, processid, result, strUpdateCommandSet process = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2:Win32_process") 'Add time change privilege to the process objectprocess.Security_.Privileges.AddAsString "SeSystemTimePrivilege",TruestrUpdateCommand = "control.exe timedate.cpl,,/Z" & szTzKey 'Launch control.exe to refresh time zone information using the TZ key name obtained above result = process.create(strUpdateCommand,Null,Null,processid)If result <> 0 Then objSh.LogEvent 1, "DST 2007 Registry Update and Refresh failed to execute on this computer. Unable to refresh the Timezone database." Wscript.Quit 0End If 'Get current display name of refreshed time zoneszCurrDispName = objSh.RegRead("HKLM\" & szTzsKeyPath & "\" & szTzKey & "\Display") 'Write entry to the Application event log stating that the update has executedobjSh.LogEvent 4, "DST 2007 Registry Update and Refresh has been executed on this computer." & chr(13) & chr(10) & chr(13) & chr(10) & "Current time zone is: " & szCurrDispName & "." |
c. On the File menu, click Save As.
d. Select a destination, and then type “refreshTZinfo.vbs” in the File name box.
e. In the Save as type box, click All Files, and then click Save
Note: the scripts provided are samples only. You will need to validate them in your lab environment before using it your production environment. Run it at your own risk.
f. Double click in the refreshTZinfo.vbs to refresh time zone information.
Note: The user must have administrative privileges to execute the script to refresh the time zone information. If the user does not have administrative privileges, then distribute the registry key via startup script as described on the session ‘Deploying the DST modifications using Group Policy’ below.
Deploying the DST modifications using Group Policy
Now, if you use Active Directory, you can use the two pieces above to deploy the DST modifications using Group Policies.
1. Click Start, click Run, type notepad, and then press ENTER.
2. Copy the following code, and then paste it into the Notepad document.
@echo off ver |find /i "6.0">nulIF %errorlevel% EQU 0 GOTO end regedit /s \\contoso.com\NETLOGON\TZupdate.regcscript \\contoso.com\NETLOGON\refreshTZinfo.vbs :end |
(Replace the \\contoso.com notation above with the actual DNS domain name for your Active Directory domain.)
3. On the File menu, click Save As.
4. DST2008Update.cmd in the File name box.
5. In the Save as type box, click All Files, and then click Save.
6. Copy the following files to the Netlogon share folder of the domain controller that holds the PDC emulator role in the domain:
- TZupdate.reg
- DST2008Update.cmd
- refreshTZinfo.vbs
7. Wait until Active Directory replication occurs. Also, wait until the files and folders in the system volume (SYSVOL) shared folder replicate to domain controllers in the domain.
8. Click Start, click Run, type control admintools, and then click OK.
9. Double-click Active Directory Users and Computers.
10. Select an Organizational Unit (OU) or the Active Directory Site which contains the computers that you want to apply this script to. In this example, we will use an OU that is named DST-COMPUTERS.
11. Right-click the DST-COMPUTERS OU and then click Properties.
12. Click the Group Policy tab, click New, type DST Registry Update, and then press ENTER.
13. Click Edit. The Group Policy Object Editor tool starts.
14. Expand Computer Configuration, expand Windows Settings, and then click Scripts (Startup/Shutdown).
15. Double-click Startup, and then click Add.
16. In the Script Name box, type the universal naming convention (UNC) path of the DST2008Update.cmd file that is located in the Netlogon share. For example, type \\contoso.com\NETLOGON\DST2008Update.cmd.
17. Click OK twice.
Note: Client computers that are within the DST-COMPUTERS organizational unit will run the startup script the next time the machine starts up, meaning all machines needs to be restarted to be able to recognize the new DST configuration via Startup script.
Important information about procedures described in this post:
- This procedure can be executed on Windows 2000, Windows XP and Windows Server 2003 Operating systems, however, in some cases, after performing these instructions on a Windows 2003 operating system, the current time zone may not be updated. In this case you may need to restart the machine or run the refreshTZinfo.vbs script manually.
- The instructions above are not supported by Microsoft on Windows Vista operating systems.
General Recommendations for Windows Users
- Do not adjust the machine’s clock manually. This will cause adverse effects on your environment and will be not supported by Microsoft.
- Before you apply the changes on Windows Operating Systems to reflect the new final date for the DST in Chile, be aware of potential issues that will affect Microsoft Office Outlook and Exchange Server. Read “Daylight Saving Time change in Chile – Effects on Outlook clients and Exchange Servers”.
Comments
Anonymous
January 01, 2003
There will be a CDO update for Exchange in summer 08. As far as I know changes in Argentina and Chile will be included. For Venezuela there's a fix already available (KB943068)Anonymous
March 07, 2008
Will there be a CDO patch for this timezone update to cover non MAPI clients such as OWA? In addition to Argentina & Venzuela in December, we now have this change in Chile in March that would surely warrant a cumulative CDO patch? Regards, Conor McKeown.