web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

DateTime values are off by one hour at some dates

(0) ShareShare
ReportReport
Posted on by 115

Hi! I have a problem when querying DateTime values. My timezone is set to UTC-03 , so if set a date field through Crm UI to  08/08/2021 00:00 it gets converted to utc and when i query it by the sdk i get 08/08/2021 03:00 then i can use ToLocalTime() to get 08/08/2021 00:00 again.

The problem is that some dates like 01/01/1998 00:00 uses for some reason UTC-02 so it gets converted by the crm to 08/08/2021 02:00 so when i convert using my timezone UTC-03 i have a difference of 1 hour 07/08/2021 23:00.

I know it could be a daylight saving time problem, I tried converting using TimeZoneInfo class to correct it but it does not work:

TimeZoneInfo zone = TimeZoneInfo.FindSystemTimeZoneById("Argentina Standard Time");

DateTime localDateTime = TimeZoneInfo.ConvertTimeFromUtc(date, zone);

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans