Udostępnij za pośrednictwem


Communicating with Microsoft Dynamics NAV Clients in Different Time Zones

Dynamics NAV can interact with RoleTailored clients in different time zones.

RoleTailored Client Implementation

The following table provides an overview of how the time zone is determined for the different RoleTailored clients.

Client Time zone
Microsoft Dynamics NAV Windows client Determined by the date and time settings of the client computer.
Microsoft Dynamics NAV Web client Determined by the time zone setting in the configuration file of the Microsoft Dynamics NAV Web client application. For more information, see Configuring Microsoft Dynamics NAV Web Client by Modifying the Web.config File.

DataTime Data Types

If RoleTailored client data contains data of the type DateTime, then upon receiving the data from the client, Microsoft Dynamics NAV Server converts this data into Coordinated Universal Time (UTC) based on the client time zone. When passing data of type DateTime back to the client, Microsoft Dynamics NAV Server converts the time back to the local time zone of the client before presenting the data to the end user.

Different countries and regions sometimes have different rules for determining when to start and end daylight saving time. If computers that run Microsoft Dynamics NAV Server are kept current with Windows updates, then changes to daylight saving time are managed automatically.

Note

There is limited support for reading and writing in UTC in the Microsoft Dynamics NAV Windows client. Specifically, the client evaluates and formats DateTime values in pages using format code 9. This format is UTC but can be difficult to read. For example, the date and time of January 1, 2008 with the long time format specifier, is displayed in the following format; 2008-01-01T10:22:00Z.

Date and Time Data Types

Date data type and Time data type are not affected by the time zone settings. The value that a user enters is the value that is saved to the Dynamics NAV database.

Implementation for Web Services and NAS Services

The CustomSettings.config file, which is the configuration file for the Microsoft Dynamics NAV Server service instance, has a Services Default Time Zone setting. This setting is also implemented in the Microsoft Dynamics NAV Server Administration Tool and in the Microsoft Dynamics NAV Windows PowerShell Cmdlets.

You use this setting to define the time zone in which web service and NAS services calls are run. The following table describes the possible values for the Services Default Time Zone setting.

Value Description
UTC Specifies that all business logic for web services on the server runs in Coordinated Universal Time (UTC). This is the default value. This is how web services business logic was handled in Microsoft Dynamics NAV 2009 SP1 and Microsoft Dynamics NAV 2009.
Server Time Zone Specifies that web services use the time zone of the computer that is running Microsoft Dynamics NAV Server.
ID of any Windows time zone Specifies any Windows time zone as defined in the system registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. For example, Romance Standard Time is a valid Windows time zone value.

When a web service writes data back to Dynamics NAV, dates and times are based on the setting of the Services Default Time Zone setting. However, the web service consumer can override the setting and specify a different time zone.

Note

Microsoft Dynamics NAV Server stores dates and times as UTC. When a web service receives data from Microsoft Dynamics NAV Server, the time zone is UTC even if the Services Default Time Zone setting is set to a different time zone.

For example, if the Services Default Time Zone setting is set to UTC+3, the following table describes two scenarios where a web service consumer modifies Dynamics NAV data and sends this back to Microsoft Dynamics NAV Server.

Web service changes the DateTime field to Microsoft Dynamics NAV Server interprets the DateTime value as Microsoft Dynamics NAV Server saves the DateTime value as
01/01/2014 17:00 UTC+1 01/01/2014 17:00 UTC+1 01/01/2014 16:00 UTC
01/01/2014 17:00 01/01/2014 17:00 UTC+3 01/01/2014 14:00 UTC

See Also

Configuring the Windows Client
Dates and Times
Managing Time Zones with Web Services