編程時調用虛擬機的時區問題

   碰到客戶曾經遇到這樣問題,用戶在使用VMware Virtual Desktop 時,thin client和虛擬機自己的時區都是正確的,可是用代碼調用本機時間時,出現的時區卻不是中國時區。查找了下VMware的kb,有如下方法能夠解決:app

To disable time zone synchronization:
  1. On the Agent machine, apply the following registry setting:

    [HKLM\Software\VMware, Inc.\VMware VDM\Agent\Configuration]
    DisableTimeZoneSynchronization="true"

     
  2. Load the vdm_agent.adm policy file (located in C:\Program Files\VMware\VMware View\Server\Extras\GroupPolicyFiles) into the Active Directory GPO templates and apply the Disable Time Zone Synchronization setting.

其實只把第一個鍵值添加到註冊表就解決問題了。ide

大概是每次啓動的時候,虛擬機的agent會你和本地的view client或thin client同步時區,可是爲何會出錯就不清楚了,禁用同步就ok了spa

相關文章
相關標籤/搜索