碰到客户曾经遇到这样问题,用户在使用VMware Virtual Desktop 时,thin client和虚拟机本身的时区都是正确的,但是用代码调用本机时间时,出现的时区却不是中国时区。查找了下VMware的kb,有以下方法可以解决:

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.

其实只把第一个键值添加到注册表就解决问题了。

大概是每次启动的时候,虚拟机的agent会你和本地的view client或thin client同步时区,但是为什么会出错就不清楚了,禁用同步就ok了