Condividi tramite


Time Zone Overview and Terminology

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

One Microsoft Dynamics AX Application Object Server (AOS) installation can meet the business needs of a company that has operations across multiple time zones. All date/time values are stored in Coordinated Universal Time (UTC).

When a date/time value is retrieved and displayed on a form, the date/time is shown in the user's preferred time zone. If the date/time value is edited and stored again, the value is converted from local time to UTC for storage.

Terminology

The following table defines terms that are used to discuss time zones.

Term

Definition

Application DateTime fields

DateTime fields in the database that are not automatically created by the AOS. Microsoft Dynamics AX ships with several application DateTime fields. Custom DateTime fields can also be added.

Examples could be ActivityStartDateTime or MeetingEndDateTime.

Date/time

A generic name for a single value that contains both date and time.

The types that hold date/time data are:

  • X++ – utcdatetime

  • Database table field – DateTime

DST

Daylight Savings Time. A rule that governs sudden jumps in the local time within any given time zone. The jumps are usually one hour. The jumps revert back, usually at the end of the winter season.

Governments set DST rules within a time zone. Changes to DST can shift the meaning of date/time values already stored.

Microsoft Dynamics AX provides a mechanism to adjust date/time values to correct for changes to DST rules.

GMT

Greenwich Mean Time. The local time at the longitudinal meridian that passes through Greenwich, England.

GMT is used as the common reference among all time zones.

Local time

Time for one particular time zone.

System DateTime fields

DateTime fields in the database that are automatically created, populated, and maintained by the AOS. The user cannot modify these fields.

Actual instances include CreatedDateTime and ModifiedDateTime.

Time zone

Any area of the Earth in which local time differs from its immediate neighbor. Consecutive time zones usually differ by one hour, or by DST rules.

Each time zone can have its own DST rules.

Update of time zone rules

Microsoft occasionally releases patches that update time zone rule data, after governments change the time zone rules. Updating the rules does not involve any upgrade of executable code.

Upgrade of Date and Time fields to DateTime

The upgrade from any product version prior to Microsoft Dynamics AX 2009 involves upgrading the product's executable code, database tables, and more. This is a one-time task.

This task replaces Date and Time field pairs with one DateTime field. It also updates time zone rule data.

UTC

Coordinated Universal Time. UTC is GMT that is updated with leap seconds (to account for the slowing of the earth's rotation).

UTC is intended as the replacement for the older concept of GMT.

Categories of Time Zone Feature Information

The time zone features in Microsoft Dynamics AX can be categorized as shown in the following table.

Feature

Description

Time Zone Related Types

  • The utcdatetime intrinsic type in X++.

  • The DateTime field type on tables.

  • The date/time controls on forms and reports.

  • The Timezone enumeration.

Convert from Time Zone Before Persisting in X++

  • X++ programmer's obligation to convert local date/time values to UTC before storing them by calling insert_recordset.

  • The use of several DateTimeUtil methods in X++.

Time Zone and DateTime Display Controls

  • DateTimeEdit on Form.

  • DateTime on Report.

  • WebDateTime on Web Form.

  • DateTime on Web Report.

Time Zone and Updating the Hidden *TZId Field

  • How the system automatically coordinates a *TZId field for each DateTime field on a table.

  • How UTC values can become invalid when governments redefine time zones and DST rules.

  • The actions of updates that Microsoft can issue to adjust for time zone and DST redefinitions.

  • Details about time zone information hidden inside the utcdatetime intrinsic type.

Time Zones and Dates

Some fields in Dynamics AX contain information about dates, some fields contain information about time, and some fields contain information about both. The fields that contain both use UTC. UTC supports multiple time zone capabilities running server-based code. The fields that only contain date information or only contain time information do not have time zone capabilities. An example of a field that does not have time zone capabilities is the Invoice Date. Invoice Date extends a date type, carries no time information, is not based on UTC, and has no time zone capabilities. If you are using a field that does not have time zone capabilities and you need it to work across multiple time zones and you require transaction-level posting with the local date and time, then you must set up an AOS in each time zone.  If you do not setup a separate AOS for each time zone, then the posting date will be reflected by the time zone which the AOS is associated not the local time zone.  For example, if your AOS is based in Greenwich Mean Time (London) and a subsidiary of your company is based in the Central Time Zone (Chicago), the time difference is usually 6 hours behind.  Any transaction that is posted after 6:00 PM in Chicago will be recorded as a transactional date for the following day, thus you will have an incorrect posting date based on local time zone.

In This Section

See also

datetime2Str Function

utcdatetime

Developing Applications Using the AOS

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.