I am facing issue with datetime field behavior.
Field: contoso_applicationDate
DataType: DateTime (date only)
Behaviour: UserLocal
Logged User TimeZone is JST which is UTC+9
I have a plugin registered on Create event PreValidation. I am getting ontoso_applicationDate from target in plugin.
Issue:
1. When JST user is creating record from FORM with value of contoso_applicationDate as 01 Jan 2024 then in Pevalidation plugin we are receiving value of contoso_applicationDate as 31 Dec 2023 3:00:00 PM. This is fine because the CRM is converting JST date to UTC date.
Logged in user JST creation of contoso_applicationDate : 1/1/2024 00:00:00
Prevalidation Plugin value of contoso_applicationDate : 31/12/2023 15:00:00
Where as the plugin when user is creating record through import then the behavior is not same as expected.
2. When JST user is creating record using import file with value of contoso_applicationDate as 01 Jan 2024 then in Pevalidation plugin we are receiving value of contoso_applicationDate as 01 Jan 2024 12:00:00 AM.
Logged in user JST creation of contoso_applicationDate : 1/1/2024 00:00:00
Prevalidation Plugin value of contoso_applicationDate : 1/1/2024 00:00:00
This is not expected behavior can you please help in this and let me know the reason for this behavior?
Thanks in advance!