none
Change timezone from command RRS feed

All replies

  • Hi Sudhir,

    Changing the timezone from Windows XP would be really simple, but the same steps wouldn't work on Windows Server 2008.

    I'm trying to change the timezone via registry settings directly from cmd.

    I'll keep you posted on the results.

    Regards,
    Amar
    Tuesday, July 21, 2009 5:04 PM
  • Hi Sudhir,

    By changing the registry entries, we can successfully change the time zone in Windows Server 2008, provided we run the following script in Administrator mode.

    For instance, if we want to change the time zone of a computer to India Standard Time, we need to change the following entries:

    Disclaimer: The script includes modification of the registry, so it is recommended that you backup your registry before trying this.

    Note: You can save the script below into a .bat file and run it as admin to change the time zone.

    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v TimeZoneKeyName /t REG_SZ /d "India Standard Time" /f
    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v ActiveTimeBias /t REG_DWORD /d 0xfffffeb6 /f
    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v Bias /t REG_DWORD /d 0xfffffeb6 /f
    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v DaylightBias /t REG_DWORD /d 0x0 /f
    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v DaylightName /t REG_SZ /d "@tzres.dll,-492" /f
    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v DaylightStart /t REG_BINARY /d 00000000000000000000000000000000 /f
    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v DynamicDaylightTimeDisabled /t REG_DWORD /d 0x0 /f
    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v StandardBias /t REG_DWORD /d 0x0 /f
    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v StandardName /t REG_SZ /d "@tzres.dll,-492" /f
    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v StandardStart /t REG_BINARY /d 00000000000000000000000000000000 /f

    To change the time zone to other values, you can look up what values have to be inserted for each of the above values and change the script accordingly.

    Note: It may take a few minutes for the change in timezone to be reflected.

    Hope this helps!

    Regards,
    Amar

    Thursday, July 23, 2009 9:19 PM