
Hello All,
We have a query on DataTime attribute returned value in D365.
For example;
I have two fields on the from new_timezoneindependent [Type: DateTime and Timezone Independent] and Createdon[DateTime & User Local]
When I retrieve the data;
I want to understand the significance of the letter "Z" at the end of the value retrieved.
I thought it denotes the "UTC+0". If that is the case; in "new_timezoneindependent" should not return "2020-03-11T08:00:00Z"
Timezone Independent means that the value is stored as it is, no matter user's time zone.
But I guess the retrieving format is the same both for User Local and Timezone Independent, fields, that's why you still get the "zulu" Z.
UserLocal |
- Stores the date and time value as UTC value in the system. |
TimeZoneIndependent |
- Stores the actual date and time values in the system regardless of the user time zone. - For the retrieve and update operations, no time zone conversion is performed, and actual date and time values are returned and updated respectively in the system regardless of the user time zone. - Retrieving the formatted value displays the date and time value (without any time zone conversion) based on the format as specified by the current user’s time zone and locale setting. - For the Web API, the attribute is exposed as DateTimeOffset. - This behavior should be used for attributes that store information such as check in and check out time for hotels. |