Citrix XenApp Troubleshooting Client Time Zone Issues

Summary

When Client Time Zone (CTZ) is enabled, the client passes its time zone information (NOT the Clock time) to the server. The server obtains the clients time zone information (GMT, daylight saving, and so on) and compares it with its own time zone information. If it is different, the server stores the clients’ time zone information in the registry.

When the server and client have the same time zone (both EST):

HKey_Users<<User-SID>>SoftwareCitrixSessionTimeZone1
“UseRegTimeZone”=dword:00000000

When the server (EST) and client (PST) have different time zones:

[HKEY_CURRENT_USERSoftwareCitrixSessionTimeZone1]
"Display"="Pacific Standard Time"
"Dlt"="Pacific Daylight Time"
"TZI"=hex:e0,01,00,00,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,02,00,00,
00,00,00,00,00,00,00,04,00,00,00,01,00,02,00,00,00,00,00,00,00
"UseRegTimeZone"=dword:00000001

A time zone hook is loaded for every application running inside that client session. Those applications use the clients’ time zone instead of the servers. For older version of ICA Clients, time zone information does not pass to the server. Thus, the server tries to estimate the clients’ time zone. The time zone synchronization happens only during session connection.

This feature is configurable by accessing Server Farm Properties on the MetaFrame Settings tab or through a Policy within the Citrix Management Console.

The time zone hook (tzhook.dll) is loaded by each application, which you should be able to see in Process Explorer. Hooks are only loaded if HKEY_LOCAL_MACHINESOFTWARE MicrosoftWindows NTCurrentVersionWindows “LoadAppInit_DLLs”=dword:00000001 is set. If running 32-bit applications on a 64-bit OS, the same value under HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindows NTCurrentVersionWindows should be set as well. This value allows the “AppInit_DLLs” value in the same key to be used for app hooking at process startup. AppInit_DLLs should be set to the path of mfapphook.dll (c:progra~2citrixsystem32mfaphook.dll,mfaphook.dll). If either of these values are missing, Time Zone redirection will fail to hook into the process.

An explanation of the settings is as follows:

  1. Use the local time of ICA Clients: All timestamps for all applications are based on the clients’ time instead of the servers.
  2. Disable local time estimation: Available after Use Local Time of ICA Clients is selected. This option prevents estimation of local time for ICA Clients other than the ICA Win32 and WinCE Clients.

Notes: For MetaFrame XP Feature Release 1, the ICA Win32 and WinCE Clients distributed with MetaFrame XP send local time information to the MetaFrame XP server. For all other versions of ICA Clients, the local time is estimated and might not be accurate. For MetaFrame XP Feature Release 2, the latest versions of ICA Clients distributed with MetaFrame XP send local time information to the MetaFrame server. For earlier versions of ICA Clients, the local time is estimated and might not be accurate. As of MetaFrame XP Feature Release 2, the Citrix ICA Java Client still did not support Client Time Zone Mapping. However, the Citrix ICA Java Client time zone is estimated.

CTX121760 – Incorrect Session Time Using the Java Client

Troubleshooting

Also see CTX120054 – Citrix Modules to Select when Obtaining a CDF Trace for Time Zone Problems

  1. For 2003 servers, verify that Microsoft’s RDP Client behaves as expected. Investigate, using gpedit.msc, for allow Time Zone Redirection.
    Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Terminal Services > Client Server/Data Redirection:
    Note
    : This Microsoft Group Policy also applies to ICA sessions and takes precedence over any settings defined at the farm level and or within a Citrix user policy.

  1. Verify the intended setting from the MetaFrame Settings tab.
  2. Verify that any applied Management Console Policies are correctly configured.

  1. Start an ICA session from the client device to the server desktop and display the clock to the system tray. The clock indicates the clients’ time zone. Verify the Time zone setting on the server and workstation (NOT the Clock time). If this is working, you might be experiencing an application-specific issue; proceed to Step 8. Otherwise, go to Step 5.
  2. Verify that Cmstart.exe, Mfaphook.dll, and Tzhook.dll exist in the Program FilesCitrixsystem32 directory of the server and ALL but cmstart.exe are of the latest version.
  3. Verify that wfshell.exe is running inside the session.
  4. Verify that there is a reference to Mfaphook.dll in the following registry key:
    Caution!
    Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.
    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsNTCurrentVersionWindowsValue Name – AppInit_DLLs
    Data Type – REG_SZ: mfaphook.dll
    Note:
    The above registry value might include additional strings. These strings are used by other Citrix features. If you want to know what the additional strings are for, search for the file on the server and view the Version tab in File Properties.
  5. Verify that there is a reference to Tzhook.dll in the following registry key:
    HKEY_LOCAL_MACHINESOFTWARECitrixCtxHookAppInit_DLLsPerSessionTimeZoneValue Name – FilePathName
    Data Type – REG_SZ: tzhook.dll
    Value Name – Flag Data Type – REG_DWORD: 0x4
    Value Name – Settings Data Type – REG_DWORD: 0x1.
  6. Verify that Cmstart.exe is listed as a string under the AppSetup value under the registry key HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsNTCurrentVersionWinlogon.
  7. Verify that a registry key, HKEY_CURRENT_USERSoftwareCitrixSessionTimeZone<SESSIONID>, is created at log on.
  8. Certain applications might be making use of system level calls to the operating system to retrieve the time. You must understand how the application retrieves the time to further troubleshoot issues of this nature. Review the descriptions, for post Feature Release 1 Hotfix number XE101W005 in the Feature Release 2 readme or for post Feature Release 2 Hotfix XE102W012 in Citrix Knowledge base article CTX089019 – Hotfix XE102W012 – Some applications, including JavaScript in Internet Explorer and forms in Microsoft Access, displayed the current time in the server’s time zone rather than converting it to the client’s time zone., to see if either of the Hotfixes could address the possible application issue cause by the ICA Client Time Zone Feature.
  9. CTX101656 – Disabling or Enabling Time Zones on a Per Server or Per User Basis
  10. CTX104494 – ASC300W001 For Access Suite Console for MetaFrame Presentation Server 3.0 for Windows 2000 and 2003 for the Access Suite Console, DWExtension.dll, and the latest version of MgmtEventProv.dll.
  11. CTX108614 – Time Zone Redirection and Legacy Applications
  12. CTX106677 – Userdump.exe May Affect Certain Virtual Channels for Non-administrator User Accounts
  13. CTX106064 – Time Zone Setting on Novell and MetaFrame Presentation Server 3.0

Changes in XenApp 6

  1. is no longer used in XenApp 6. Citrix now relies on Microsoft APIs to establish time zone during an ICA session. Data is no longer written to the user registry hive.
  2. See CTX126099 – How to Configure Time Zone Redirection in XenApp 6.0 Using the Windows Group Policy Management Editor for more details on how to set up Time Zone Redirection in XenApp 6.

More Information

CTX111734 – Daylight Saving Time Changes in 2007

Connecting to servers over RDP causes excessive querying of the SessionTimeZone registry key. This occurs because the code does not discern between ICA and RDP sessions. For RDP sessions, the queries are unnecessary.

This fix introduces support for limiting the queries to ICA sessions. To limit the queries to ICA sessions, set the following registry key:

HKEY_LOCAL_MACHINESOFTWARECitrixCtxHookAppInit_DllsPer Session Time Zone
Name: Flag
Type: REG_DWORD
Data: 00000014

[From XE104W2K3003][#98019] – Search the Knowledge Base for 98019 for a platform equivalent.

This document applies to:

 

Source: Troubleshooting Client Time Zone Issues

Leave a Reply

Your email address will not be published. Required fields are marked *