locked
Change timezone from command RRS feed

  • 问题

  • how to change timezone from command in windows server 2008

    Sudhir
    2009年7月1日 10:45

答案

全部回复

  • Hi,

     

    1. Open an elevated "Command Prompt".

    2. Now provide any of following commands:

     

    tzutil /g (To know current time zone)

    tzutil /l (To get a list of all available time zones)

    tzutil /s time_zone_ID (To change time zone)

     

    Fox example, if you want to set the time zone to "Pacific Standard Time", then the command would be:

     

    tzutil /s "Pacific Standard Time"

     

     

    Best regards,

    Vincent Hu

     

    • 已建议为答案 Allenoush 2013年5月30日 16:25
    2009年7月1日 11:20
  • Hello Vincent,

    as far as i know tzutil comes with windows 2008 R2, 64bit and windows 7, it is not included in 2008.
    Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.
    2009年7月1日 11:27
  • Yes tzutil comes with windows 2008 R2, 64bit and windows 7. i am looking for only windows 2008 server not R2
    Sudhir
    2009年7月1日 11:37
  • Hello,

    if you have te equivalent 32/64bit just copy the file to the 2008 machine and try if it works.
    Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.
    2009年7月1日 11:41
  • hi Vincent,

    meinolf is correct windows 2008 doesnt has tzutil.exe, its supported OS is windows 7 and windwos 2008 r2.

     But as platforms are same you can copy the util to system32 and change the timezone from command prompt.


    sainath !analyze

    2009年7月1日 11:55
  • tzutil.exe will not work on server 2008
    Sudhir
    2009年7月1日 12:31
  • hi there,

    yes i tested by copying tzutil.exe from windows 2008 r2 to windows 2008 server, and it gives me an error ( os incompatibility error )
    sainath !analyze
    2009年7月1日 12:50
  • Hello,

    even with the correct bit version?
    Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.
    2009年7月1日 12:59
  • yes meinolf even with the correct bit virsion
    Sudhir
    2009年7月1日 13:07
  • hi ,

    i tried using

    RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z (GMT+02:00) india

    but it didnt work in windows 2008, i find that control.exe is not present.


    sainath !analyze
    2009年7月1日 13:25
  • Hello,

    i also tried the RunDll....... command before. What you can do is to extract a correct configured registry key and import it with "reg add" in a startup script on the 2008 servers.

    HKLM\System\CurrentControlSet\Control\TimeZoneInformation
    Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.
    2009年7月1日 13:46
  • no i cannot import the reg as the timezone change will vary with systems


    Sudhir
    2009年7月1日 14:03
  • Hello Vincent,

    as far as i know tzutil comes with windows 2008 R2, 64bit and windows 7, it is not included in 2008.
    Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.

    Hi,

     

    Sorry, my miss.

     

    It seems that we can't change the time zone directly through the command prompt.

     

    I wonder what's the OS are you using? Do you want to change the time zone in Windows 2008 Server Core edition? If so, you can run Control timedate.cpl in the command prompt line, this will fire up the Time and Date Control Panel applet, you can change the time zone later.

     

     

    Best Regards,

    Vincent Hu

    2009年7月1日 14:06
  • Vincent,

    i am using 2008 standard full edition. i can open the Time and Date Control Panel applet on mouse click. but i want it to be done without showing UI. I wonder how microsoft doing.


    Sudhir
    2009年7月1日 14:43
  • Hi,

     

    You may try to use PowerShell.

     

    Setting the Time Zone using Windows PowerShell

    http://blogs.technet.com/deploymentguys/archive/2009/06/07/setting-the-time-zone-using-windows-powershell.aspx

     

     

    Best regards,

    Vincent Hu

     

    2009年7月2日 11:13
  • thank you Vincent
    2014年5月5日 9:57
  • Thanks much
    2016年1月16日 7:03
  • Hi Sudhir,

    you can change TimeZone using PowerShell, and the command is "tzutil /"

    g - Current TimeZone

    l - List of TimeZone

    s - Save TimeZone

    check out the video tutorial that i have made and explained in details 

    https://youtu.be/JvLa5HjEjHM

    Hope this video will help you :)


    2020年2月26日 7:31