logo
search
Others

Fix Microsoft CRM PCF Date and Time Field Time Zone Display Issues

Algirdas JasaitisAlgirdas Jasaitis Oct 20, 2026 869 views

Question details

The user needs to resolve an issue where two different PowerApps Component Framework (PCF) controls display inconsistent dates for the same time-zone-independent field.

Fix Microsoft CRM PCF Date and Time Field Time Zone Display Issues
Product
Microsoft CRM
Device & OS
not provided
Scenario
Developing or implementing custom PCF controls that retrieve and pass date and time parameters from Dataverse.
Observed behavior
One PCF control displays April 30, while another displays May 1 for the database value 2023-04-30T21:44:03Z, pointing to inconsistent UTC parsing or unwanted local time conversion.
Before you start

Ensure you have system customizer privileges in Dynamics 365/Microsoft CRM to inspect Dataverse field behaviors and access the source code for your PCF controls.

Solution 1Recommended

Standardize UTC Parsing in PCF JavaScript Logic

Prevent the native JavaScript Date object from automatically converting UTC timestamps to the browser's local time zone by explicitly handling the UTC values.

When a time-zone-independent field is passed to a PCF control, the raw value is often formatted in ISO 8601 (e.g., ending with 'Z' for UTC). If the receiving control uses the standard JavaScript Date object without explicit UTC methods, the browser applies the local time zone offset, causing the date to shift forward or backward.

1
Inspect the Web API Response

Check the network tab in your browser's developer tools to verify the exact string value being returned by the CRM Web API before it reaches the PCF control.

2
Update JavaScript Parsing Methods

Modify the control's code to use UTC-specific JavaScript methods such as getUTCDate(), getUTCMonth(), and getUTCFullYear() instead of standard local date methods.

3
Normalize ISO 8601 Values

Ensure that parameters passed between the two PCF controls are correctly normalized as explicit UTC strings to prevent the second control from treating the value as a local string.

Standardize UTC Parsing in PCF JavaScript Logic
Time Zone Settings: Changing the user's personal CRM time zone settings will not fix conversions introduced locally by the PCF or JavaScript code.
Free Microsoft Office alternative

Easily Manage Exported CRM Data with WPS Office

While WPS Office cannot directly alter Microsoft CRM PCF code, it is the perfect lightweight alternative for opening, analyzing, and formatting exported CRM reports. Enjoy full compatibility with Microsoft Excel formats without the high subscription costs.

  1. 1. Download the Software: Get the free WPS Office suite from the official website and install it on your device.
  2. 2. Open CRM Exports: Launch WPS Spreadsheet and seamlessly open your downloaded CRM data files natively.
  3. 3. Analyze Data: Utilize built-in pivot tables and formatting tools to review and adjust your date and time fields easily.
100% free and lightweight office suiteFully compatible with Microsoft Excel (.xlsx) CRM data exportsFamiliar user interface with zero learning curvePowerful data analysis, formatting, and pivot table tools
microsoft office alternative - wps office

Frequently Asked Questions

Why does the JavaScript Date object alter my CRM dates?

By default, the native JavaScript Date object automatically converts UTC timestamps (which are standard in CRM database responses) into the user's local browser time zone. This offset can unintentionally shift the displayed date to the previous or next day depending on your location.

Will changing the user's CRM time zone fix this PCF control issue?

No. Changing the personal time zone settings within Microsoft CRM will not correct date conversion errors that are hardcoded or introduced dynamically by custom PCF logic or browser-side JavaScript parsing.

What is a Time-zone-independent field in Dynamics 365?

A time-zone-independent field is a specific configuration where date and time values are saved to the database and displayed exactly as entered. It intentionally prevents the system from automatically converting the value to UTC or adjusting it based on the user's local time zone.