I have the following CSOM code inside my C# console application:-
var regionalSettings = context.Web.RegionalSettings;
var localDueDate = regionalSettings.TimeZone.UTCToLocalTime(itemversion.Created).Value;
but the localDueDate will always be equal to 01/01/0001 00:00:00
.. my site collection regional setting is :-
so i though the above code will add 4 hours to the DateTime.. so can anyone advice what is wrong with my code? in my case the itemversion.Created
equal 14/10/2020 13:14:11
, but var localDueDate = regionalSettings.TimeZone.UTCToLocalTime(itemversion.Created).Value;
will return 01/01/0001 00:00:00
!!