Advisory: Bangladesh decides to end daylight saving time on December 31, 2009

On Monday, December 28, 2009 the Bangladesh government announced that, following a cabinet decision last week, the clocks would move back one hour to standard time at 11:59 PM on Dec 31. The decision was also reported on The Daily Star.

A notice from the power ministry on Sunday, however, clarified that clocks would be set back again one minute before midnight on Dec 31.

The notice also stated that the government has decided to continue with Daylight Saving Time from 2010 to ensure maximum utility of daylight.
Clocks will be advanced to 11:59pm (GMT+7) from 10:59 pm on March 31, to continue until Oct 31.
They will be turned back to 10:59pm (GMT+6) from 11:59 pm on Oct 31, to run until March 31.

This communication only addresses recommendations for the Dec 31, 2009 change. Microsoft will communicate future guidance for the 2010 DST transitions.

Users on all Windows OS platforms can switch their computers to the Central Asia Standard Time (Display name: (GMT+06:00) Astana. For users that did not apply KB978125, the time zone display name will look like this: (GMT+06:00) Astana, Dhaka).

Alternatively, for Windows OS versions released earlier than Vista, users may opt to update the registry key manually if they previously applied KB978125. Please note that the registry key value will be different if this operation is performed before Jan 1, 2010 than if it is performed after the start of the New Year, 2010. The reason for this is that the registry key value is different in 2009 than it is in 2010. Details on how to perform this operation can be found below in the section titled: “Manual Method to Perform DST Changes on down level platforms from Vista”.

Microsoft's product teams have moved to a regular rhythm to update their products and services to reflect time changes. For each update release, Microsoft accepts change requests at up to a few months prior to the release date. Please refer to Microsoft's Policy in Response to DST/TZ Requests, providing recommendations in order to achieve more seamless transitions to new DST and time zones policies. We suggest that governments should provide the following when considering changing DST or making adjustments to time zones:

1. Ample advance notice (1 year or more) of the planned change.
2. Official published confirmation of planned changes to DST or time zones.
3. Concentrated efforts on promoting the change to the affected citizens.

Important notes for governments:  

  • Please refer to Microsoft's Policy in Response to DST/TZ Requests. It's important for countries and territories to work towards seamless transitions to new DST and time zones policies, providing ample advance notice (of a year or more) with published confirmation of planned changes.
  • We suggest that entities planning DST changes consider implementing changes at the next clock tick after 01:59:59 rather than at 00:00:00. Making the change at midnight can impact daily systems, such as back-ups, financial reports, data pulls or other automated tasks.

 

Manual Method to Perform DST Changes on down level platforms from Vista.

Prepare three files based on the source outlined below:

BanglaTZUpdate.reg
This will be the Time Zone update registry file. It will change the time zone and DST setting for Bangladesh, and should not be altered in any way. A pre-requisite of pursuing this option is to have the “Bangladesh Standard Time” time zone already defined in the Registry.

Users updating the registry key in 2009 must use the following value for the registry key:

Windows Registry Editor Version 5.00

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Bangladesh Standard Time]

"TZI"=hex:98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0c,00,04,00,05,00,17,00,\

  3b,00,00,00,00,00,00,00,06,00,05,00,03,00,17,00,00,00,00,00,00,00

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Bangladesh Standard Time\Dynamic DST]

"FirstEntry"=dword:000007d8

"LastEntry"=dword:000007da

"2008"=hex:98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,\

  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

"2009"=hex:98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0c,00,04,00,05,00,17,00,\

  3b,00,00,00,00,00,00,00,06,00,05,00,03,00,17,00,00,00,00,00,00,00

"2010"=hex:98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,17,00,\

  3b,00,00,00,00,00,00,00,03,00,03,00,05,00,16,00,3b,00,00,00,00,00

 

Users updating the registry key in 2010 must use the following value for the registry key:

 

Windows Registry Editor Version 5.00

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Bangladesh Standard Time]

"TZI"=hex:98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,17,00,\

  3b,00,00,00,00,00,00,00,03,00,03,00,05,00,16,00,3b,00,00,00,00,00

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Bangladesh Standard Time\Dynamic DST]

"FirstEntry"=dword:000007d8

"LastEntry"=dword:000007da

"2008"=hex:98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,\

  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

"2009"=hex:98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0c,00,04,00,05,00,17,00,\

  3b,00,00,00,00,00,00,00,06,00,05,00,03,00,17,00,00,00,00,00,00,00

"2010"=hex:98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,17,00,\

  3b,00,00,00,00,00,00,00,03,00,03,00,05,00,16,00,3b,00,00,00,00,00

refreshTZinfo_Bangla.vbs
The DST and time zone settings registry must be updated in two locations to become active. Importing the BanglaTZUpdate.reg file updates the time zone database in the registry and is the first step required. You must then update the TimeZoneInformation registry key in the <current control set> key.

The following script will identify the current time zone of the client computer and then reload the TimeZoneInformation registry key with the updated information from the time zone database.

The script contains some logging, as it writes an event to the Application log of the client computer where the script was run to report the status of the installation - Event ID 1 is reported when there was some form of failure, or Event ID 4 is reported on success. You may modify or extend this script as you see fit to perform any additional logging or reporting you require.

Set objSh = CreateObject("WScript.Shell")

 

'Get the StandardName key of the current time zone

szStandardName = objSh.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\StandardName")

 

'Enumerate the subkeys in the time zone database

const HKEY_LOCAL_MACHINE = &H80000002

Set 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 Name

szTzKey = "<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 If

Next

 

 

If szTzKey = "<Unknown>" Then

       'Write entry to the Application event log stating that the update has failed to execute

       objSh.LogEvent 1, "DST 2009 Registry Update and Refresh failed to execute on this computer. Time zones failed to enumerate properly or matching time zone not found."

       Wscript.Quit 0

End If

 

Dim process, processid, result, strUpdateCommand

Set process = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2:Win32_process")

 

'Add time change privilege to the process object

process.Security_.Privileges.AddAsString "SeSystemTimePrivilege",True

strUpdateCommand = "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 Registry Update and Refresh failed to execute on this computer. Unable to refresh the Timezone database."

    Wscript.Quit 0

End If

 

'Get current display name of refreshed time zone

szCurrDispName = objSh.RegRead("HKLM\" & szTzsKeyPath & "\" & szTzKey & "\Display")

 

'Write entry to the Application event log stating that the update has executed

objSh.LogEvent 4, "DST Registry Update and Refresh has been executed on this computer." & chr(13) & chr(10) & chr(13) & chr(10) & "Current time zone is: " & szCurrDispName & "."

 

Note: Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose.

BanglaTZUpdate.cmd
This is a batch file that will execute the above scripts sequentially. This will most likely be used in environments that require an automated deployment methodology across multiple machines, such as Group Policy. It states the location of the above files is \\contoso.com\NETLOGON\ which should be updated to reflect your own environment.

 

@echo off

regedit /s \\contoso.com\NETLOGON\BanglaTZUpdate.reg

cscript \\contoso.com\NETLOGON\refreshTZinfo_Bangla.vbs

 

 

Deploying the manual update on a single computer

To deploy the update on a single computer, create or copy the first two files from above to an accessible location. Double-click on the .reg file, and then double-click on the .vbs script, to add the new time zone information to the registry and make it active. The DST settings will be changed.

Deploying the manual update on multiple computers

The following steps will assist guiding you in deploying the update to multiple computers using Group Policy Objects. These steps outline the basic approach to take, but all actions should be carried out in accordance with your established standards and change management practices. For other environments, you can use the scripts provided earlier and an installation/execution method of your choosing.

1. Decide an appropriate location to contain the script files within your Netlogon folder of the domain controller that holds the PDC emulator role in the domain.

2. Ensure the BanglaTZUpdate.cmd file contains the full path to both the .reg file and the .vbs file as decided in Step 1.

3. Copy the following files to the chosen location:

· BanglaTZUpdate.reg

· refreshTZinfo_Bangla.vbs

· BanglaTZUpdate.cmd

4. Wait until Active Directory replication occurs and the files and folders in the system volume (SYSVOL) shared folder replicate to all domain controllers in the domain.

5. Click Start, click Run, type ‘control admintools’, and then click OK.

6. Double-click Active Directory Users and Computers.

7. Select an OU that contains the computers that you want to apply this script to. In this example, we will use an OU that is named DST_Bangla. This example also assumes that this OU contains only computer accounts.

8. Right-click the DST_Bangla OU, and then click Properties.

9. Click the Group Policy tab, click New, type Bangla DST Registry Update, and then press ENTER.

10. Click Edit. The Group Policy Object Editor tool starts.

11. Expand Computer Configuration, expand Windows Settings, and then click Scripts (Startup/Shutdown).

12. Double-click Startup, and then click Add.

13. In the Script Name box, type the universal naming convention (UNC) path of the BanglaTZUpdate.cmd file location within the Netlogon share as decided in Step 1.
For example, type \\contoso.com\NETLOGON\BanglaTZUpdate.cmd

14. Click OK two times.

Once this is completed and AD replication has completed, all client computers that are within the DST Bangladesh OU will run the DST update startup script the next time that they restart, and any that are located within this time zone will observe the new DST settings.