Time change on October 26, 2014 or hit by sloppiness

    The Russian State Duma adopted in July a bill to return to winter time, as well as to establish a new system of time zones. As a result, on October 26, 2014, in most regions of Russia, time will again be set back an hour, and 11 time zones will appear in the country instead of the 9 existing now, with their borders changing.

    If for ordinary citizens this is just an extra hour to sleep, then for the system administrator this moment is terrible. In this article, I will consider the problem of updating time zones for Windows XP, Windows Server 2003, and the email system based on MS Exchange 2003 with the native Outlook client. It is no secret that these systems have not gone away and although XP and Exchange 2003 have been removed from all types of support, including even prime support, they are successfully used in both small and large organizations and the event associated with the switch of hands an hour ago is relevant for them more than ever. It is also relevant for the reason that there are no and will not be official updates for discontinued systems from Microsoft. Because by type of activity, I had to prepare a solution for these systems, conduct some tests, etc., I decided to share the results of my work with my colleagues. So, who cares, welcome to cat. It will be interesting.

    Some general information


    With the adoption of the Federal Law of the Russian Federation of July 21, 2014 No. 248-ФЗ “On Amendments to the Federal Law“ On Calculation of Time ”on the territory of the Russian Federation on October 26, 2014, the clock is transferred and the corresponding time zones and time values ​​are set. As a result, most regions of Russia will switch back 1 hour, while 3 new time zones will be created and 2 current time zones will be merged into one new one. The configuration of time zones will change - a number of regions will move to neighboring or new zones. Daylight saving time will not continue during the year.
    On September 23, 2014, Microsoft released a cumulative update (kb2998527) for Windows operating systems to take into account current changes in the order of time and posted it for download at the Microsoft Download Center ( https://support2.microsoft.com/kb/2998527 / ) and the Windows Update automatic update system ( https://catalog.update.microsoft.com ). This update contains the latest changes adopted in Russia. In addition, a new time zone for the Republic of Belarus will be created in Windows operating systems.

    The change in the calculation of time will occur on October 26, 2014 at 2:00 local time. In this regard, in Windows operating systems, these changes will be displayed at the moment the clock count changes after 1h: 59m: 59s.

    what will happen on October 26, 2014 at 2:00 local time


    Time zones in Russia will change quite significantly. A picture from the Lenta.ru site.


    As a result, we are waiting for the next fun life, namely.

    Changes to existing time zones

    after you install update KB29985527 on your operating systems, the following will change in the existing time zones specified in the systems
     
    New time zone name
    New display name
    Current Time Zone Name
    Current display name
    one
    Russia Time Zone 1
    (UTC + 02: 00) Kaliningrad (RTZ 1)
    Kaliningrad Standard Time
    (UTC + 03: 00) Kaliningrad, Minsk
    2
    Russia Time Zone 2
    (UTC + 03: 00) Moscow, St. Petersburg, Volgograd (RTZ 2)
    Russian Standard Time
    (UTC + 04: 00) Moscow, St. Petersburg, Volgograd
    3
    Russia Time Zone 4
    (UTC + 05: 00) Ekaterinburg (RTZ 4)
    Ekaterinburg Standard Time
    (UTC + 06: 00) Ekaterinburg
    four
    Russia Time Zone 5
    (UTC + 06: 00) Novosibirsk (RTZ 5)
    North central asia standard time
    (UTC + 07: 00) Novosibirsk
    five
    Russia Time Zone 6
    (UTC + 07: 00) Krasnoyarsk (RTZ 6)
    North asia standard time
    (UTC + 08: 00) Krasnoyarsk
    6
    Russia Time Zone 7
    (UTC + 08: 00) Irkutsk (RTZ 7)
    North asia east standard time
    (UTC + 09: 00) Irkutsk
    7
    Russia Time Zone 8
    (UTC + 09: 00) Yakutsk (RTZ 8)
    Yakutsk standard time
    (UTC + 10: 00) Yakutsk

    On October 26, 2014 at 2 a.m. local time, the hours of user PCs located in these time zones will be automatically converted to winter time. But there were some exceptions. The exceptions are:
    • in the Republic of Udmurtia and the Samara Region, you should manually switch to the “Russian Time Zone 3” time zone instead of the automatically set time zone RTZ 2 (Russian Time Zone 2);
    • in the Kemerovo region, you should manually switch to the “Russian Time Zone 6” time zone instead of the automatically set time zone RTZ 5 (Russian Time Zone 5);
    • in the Trans-Baikal Territory, you should manually switch to the “Russian Time Zone 7” time zone instead of the automatically set time zone RTZ 8 (Russian Time Zone 8).


    New time zones

     
    New time zone name
    New display name
    Current Time Zone Name
    Current display name
    one
    Russia Time Zone 3
    (UTC + 04: 00) Izhevsk, Samara (RTZ 3)
    Missing
    Missing
    2
    Russia Time Zone 10
    (UTC + 11: 00) Chokurdakh (RTZ 10)
    Missing
    Missing
    3
    Russia Time Zone 11
    (UTC + 12: 00) Anadyr, Petropavlovsk-Kamchatsky (RTZ 11)
    Missing
    Missing

    User computers located in these time zones must be manually set to the appropriate time zone. Otherwise, from October 26, 2014, from 2 a.m. local time, the time display on these computers will be incorrect.

    Time Zone Consolidation

     
    New time zone name
    New display name
    Current Time Zone Name
    Current display name
    one
    Russia Time Zone 9
    (UTC + 10: 00) Vladivostok, Magadan (RTZ 9)
    Vladivostok Standard Time
    (UTC + 11: 00) Vladivostok
    Magadan standard time
    (UTC + 12: 00) Magadan

    For computers configured to the “Vladivostok Standard Time” time zone, the time zone changes automatically. For computers configured to the “Magadan Standard Time” time zone, only time adjustments will occur. Computers in this time zone must be manually switched to the new time zone “Russia Time Zone 9” as the main time zone after October 26, 2014.
    The exceptions for computers configured for “Magadan Standard Time” are:
    • in the Magadan region, you should manually switch to the “Russian Time Zone 8” time zone;
    • in the Chukotka Autonomous Okrug (Chukotka) and Kamchatka Krai (Kamchatka), you must manually switch to the time zone “Russia Time Zone 11”.


    Expected Issues


    Well, as without this:
    • for Windows XP there will be no official updates to adjust the time display (except for the Embedded edition);
    • Windows Server 2003 and Windows XP Embedded operating systems will not be automatically reconfigured to new time zones after installing the KB2998527 update (even if they are automatically configured for other operating systems);
    • Microsoft Outlook mail clients up to version 2007 inclusive (versions of Microsoft Outlook 2010 and later do not experience a similar problem) after changing the time at two in the morning on October 26, 2014 will incorrectly display tasks created earlier than this date from the calendar (the time will shift by an hour ago ), scheduled for a date later than 2 a.m. on October 26, 2014.
    • The ugly ADD MS released a curve patch for Windows XP Embedded and Server 2003. Corrections are expected in December 2014. Or just after October 26, uncheck the option “Automatically switch to daylight saving time and back"

    Start updating


    Microsoft Windows XP Professional Update

    For XP, we have two upgrade options:
    • turn XP into Embedded;
    • make changes to the registry directly.

    Turn XP into Embedded
    Turning begins:
    • start the registry editor on the target machine and follow the path HKEY_LOCAL_MACHINE \ SYSTEM \ WPA \;
    • select the WPA section with the right mouse button and select the Create - Section context menu item;
    • Create a partition called PosReady
    • inside the PosReady section, create a DWORD parameter named Installed and set it to 1.

    After the modification on XP, you can install the patch kb2998527 from the Embedded version. You can take it from, for example, the Windows Update directory using the link at the very beginning.

    After installation is complete, you must manually change the time zone. For Moscow time, you will have to change +04: 00 Abudabi to +03: 00 RTZ 2. Do not forget to check that the checkbox for "Automatically switch to daylight saving time and back" is checked. Otherwise, the time translation will be incorrect. Therefore, if your OS is older than 2011 and this flag was unchecked on it, it will not return back after installing the patch. Why MS did so - I do not understand.

    After you apply the hotfix from Embedded, the new values ​​in the WPA registry key can be deleted. You can delete them before reboot. After rebooting, the OS will not allow them to be deleted. Unfortunately, I can’t say what this registry branch can affect and / or the installation of a patch for Embedded.

    Making registry changes directly The
    second option for changing time zones on Windows XP can be direct registry editing. It is convenient when you have a bunch of XP in, for example, a domain that requires updating. Then create .reg files and distribute them through group policy. To do this, you need to collect the reference XP (for example, on a virtual machine), turn it into Embedded in the above way, install the kb2998527 fix, set the correct current time zone and unload two registry branches:
    • HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Time Zones - time zone database
    • HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ TimeZoneInformation - current time zone

    Save them under the names (for convenience of further understanding) 3.reg and 4.reg. Also create two files 1.reg and 2.reg with the following contents respectively:
    [-HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Time Zones] - removes the time zone database
    [-HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ TimeZoneInformation] - deletes the value of the current time zone

    As a result, we will have four files for distribution: 1.reg, 2.reg, 3.reg and 4.reg. In such a sequence, they will need to be applied. By the way, in this way we get two bonuses:
    • no need to bury your head with the flag “automatic daylight saving time” - it will be installed automatically
    • calendars will not “go” in Outlook (more on that below)


    ADD all parameters from 1.reg, 2.reg, 3.reg and 4.reg files can be placed in one .reg file. It will be more convenient.

    Dissemination via GPO
    Because in the 2003-XP environment, the established preferences of group policies are quite rare, we will make corrections in the registry with a simple script. To do this, create a file with the extension .cmd as follows:
    @echo off
    IF EXIST c:\windows\ok.file (exit) ELSE (regedit /s \\contoso.internal\SYSVOL\contoso.internal\scripts\1.reg & regedit /s \\contoso.internal\SYSVOL\contoso.internal\scripts\2.reg & regedit /s \\contoso.internal\SYSVOL\contoso.internal\scripts\3.reg & regedit /s \\contoso.internal\SYSVOL\contoso.internal\scripts\4.reg & echo. 2>c:\windows\ok.file & tzchange.exe /c “Russian Standard Time”)

    The script does the following: check if the ok.file file is in the Windows folder and if it is, then shuts down. The script has already been executed. If the file does not exist, then the values ​​from the .reg files are applied in the specified sequence. Remember that .reg files must be accessible on a network path. After application, the ok.file file is created in the Windows directory and the current time zone is assigned, because after a change in the registry, this will not happen automatically. Alternatively, you can simply reboot the PC instead of the tzchange command (or give the shutdown -r command). How do you like it.

    It remains to do group policy. We go to the editor of group policies. Expand Computer Configuration - Windows Settings - Scripts. In the left part of the policy editing window, double-click on the Startup item. In the window for editing the properties of the Startup item, click the Add button and add the previously created .cmd file via the network path. Click OK twice and close the Group Policy Editor window. Apply the created policy to the organizational unit containing the accounts of the target PC. After rebooting the target PCs, the policy will apply.

    Microsoft Windows 2003 Server Update

    For Microsoft Windows 2003, update kb2998527 has been released. Therefore, the main problem is to translate the time zone where necessary. It is clear that this can be done manually. As well as deleting registry values ​​and adding the necessary ones (for example, in the same way as for XP). To do this, on the reference machine with the update installed and the correct time zone, it is necessary to unload the HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ TimeZoneInformation registry branch and save it under the name 2.reg. Then create a 1.reg file with the following contents
    [-HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ TimeZoneInformation].
    Apply the above method through Group Policy to the Windows 2003 servers in the specified sequence. First, file 1, then 2. And then to choose either the command to change the current time zone or just reboot.

    Update Jobs in the Outlook 2000-2007 Calendar

    And the last problem in the context of legacy Microsoft systems, which I had to face when testing the switch to winter time, is that in tasks that were created before switching to winter time for dates later than October 26, time “went” an hour ago. In other words, what was scheduled for 9am was after installing patch kb2998527 on dates later than October 26th, it was scheduled for 8am. What is wrong. By the way, when testing on XP where the changes were applied to the registry directly (without "turning" the OS into Embedded), the calendars did not "go". Where the update was installed, everything was as it should - they left.

    Microsoft has a utility for this. There are actually two of them, one running on the client, the other directly on the Exchange server. But since what is done on the Exchange server can break it (and the MS hints at it) it’s safer to run around the machines, if anything, than conjure over restoring the database. Therefore, I will only consider a utility that runs on the client side. Also, I will not consider updating calendars in office mailboxes and public folders. All this is considered in the MS article (it will be below) and the essence of this post is somewhat indirect.

    Calendars “travel” on almost all operating systems after changing the time zone with the Outlook version from 2000 to 2007. Why practically, because it’s worth checking. Maybe you are lucky and the tasks will remain in place. For example, in my experiments, calendars in Outlook 2007 remained correct in Windows 7. But the official position of the MS is such that the specified versions of Outlook “go.” Outlook 2010 and 2013 do not require action. Everything is always normal there.

    So, in order to correct the work of the “gone” tasks in calendars, we need to go to the website http://support2.microsoft.com/kb/930879/enand download either the 32-bit or 64-bit version of the time zone data updater package. There’s no problem with that. The problem is in mass deployment and in mass execution. Officially, the MS says literally the following “install and run”. Which is not always convenient. Therefore, I faced the task of transferring this all to group policies.

    As a result, it turned out that the calendar correction tool - OutlookTimeZoneMove.exe - is nothing more than an archive that can be picked by the same WinRAR. Which was done. The TZMove.msi file was extracted from the OutlookTimeZoneMove.exe file. Unfortunately, the versions for x64 and x86 are named the same, so be sure to rename TZMove.msi to TZMove_32.msi and TZMove_64.msi, respectively.

    After that, these files must be placed on a network share that is available for domain users to read and create a group policy for distribution. You will have to create two group policies and configure execution on the OS with its bit depth (for example, through WMI filters), but these settings are beyond the scope of this article.

    After creating a group policy, open it for editing. Expand User Configuration - Software Settings. Click on the Software installation item, select the New - Package context menu item and add the TZMove.msi file along the network path. Click OK. In the right part of the policy editing window, double-click the created package and enter its properties. Go to the Deployment tab and set the distribution type switch in Assignrd and in the switch on the Install this application at logon item.

    Click OK to close the Group Policy Editor window. Apply the created policy to the organizational unit containing the target user accounts. After the PC reboots and the target user logs in, the task adjustment management tool in the Outlook calendar will be deployed to the target PC for the target user.

    And we can only launch this tool, because it’s hard enough to force the user to do it himself. The difficulty, at first glance, lies in the fact that the remedy tool is installed in three versions of the path to the executable file:

    • For 32x OS - “% PROGRAMFILES% \ Microsoft Office \ Office12 \ Office Outlook Time Zone Data Update Tool \ tzmove.exe”
    • For 64x OS - “% PROGRAMFILES (x86)% \ Microsoft Office \ Office12 \ Office Outlook Time Zone Data Update Tool \ tzmove.exe”
    • For Outlook 2010 64x - “% PROGRAMFILES% \ Microsoft Office \ Office14 \ Time Zone Data Update Tool for Microsoft Outlook \ tzmove.exe”

    This would seem to be a problem. But in fact, everything turned out to be simple. We create a file with the extension .cmd and add the following contents there: The script will check whether the ok1.file file is in the user profile folder and if it is, the script terminates (it has already been executed). If there is no file, then the script tries to execute in “silent” mode a tool for adjusting tasks in the user's calendar in all three possible ways. One yes and it will work. Not the Jedi path, but quickly implemented. Then it creates the ok1.file file and exits.
    @echo off
    IF EXIST "%userprofile%\ok1.file" (exit) ELSE ("%PROGRAMFILES%\Microsoft Office\Office12\Office Outlook Time Zone Data Update Tool\tzmove.exe" /quiet & “%PROGRAMFILES(x86)%\Microsoft Office\Office12\Office Outlook Time Zone Data Update Tool\tzmove.exe” /quiet & “%PROGRAMFILES%\Microsoft Office\Office14\Time Zone Data Update Tool for Microsoft Outlook\tzmove.exe” /quiet echo. 2>"%userprofile%\ok1.file")



    After creating a group policy, open it for editing. Expand User Configuration - Windows Settings - Scripts. In the left part of the policy editing window, double-click on the Logon item. In the window for editing the properties of the Logon item, click the Add button and add the previously created .cmd file via the network path.
    Click OK twice and close the Group Policy Editor window. Apply the created policy to the organizational unit containing the target user accounts.

    After the target PC reboots, the target user’s login will be silently corrected (not requiring user interaction) in the Outlook calendar.

    That is all I wanted to tell. Hope this helps those facing this issue. I will be glad to answer questions and comments.

    Bonus for those who have read to the end:
    if you don’t know whether the checkbox for OS 2003 and XP was installed or unchecked, where the hotfix will be installed, simply delete one registry value by distributing the .reg file with the following contents:
    [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ TimeZoneInformation]
    “DisableAutoDaylightTimeSet” = -

    Also popular now: