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 :
Microsoft Dynamics CRM (Archived)

UTC Time to UTC Date Time object

(0) ShareShare
ReportReport
Posted on by 680

Hi All,

I have a requirement where I need to convert the UTC time (retrieved from database using REST) to GMT +8. My plan is to convert that UTC time string to a Date Time object then just add +8 hours but when I try to convert it to a UTC Date Time object, it is automatically converted to users timezone local time.

Please advise. Thanks

*This post is locked for comments

I have the same question (0)
  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi LMP,

    Coudl you please share how you are converting the retrieved datetime value. If I am not wrong, using SDK, the datetime returned will always be UTC and saved will always be UTC and in CRM it will always be displayed as users timezone.

    Perhaphs, you can share some more details around you requirement as there could be some other alternative which you can apply example, changing the datetime field to just date or somthing else.

  • Temmy Wahyu Raharjo Profile Picture
    2,916 on at

    Hi, if you custom in plugin it is correct you will get utc time. If you custom in javascript, you will get time with user timezone. so you need to execute UtcTimeFromLocalTimeRequest via javascript. You can refer to this https://code.msdn.microsoft.com/vstudio/SdkSoapjs-9b51b99a/sourcecode?fileId=113716&pathId=297446329 (I'm not test yet, so you need to investigate this one).

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans