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 678

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

  • Temmy Wahyu Raharjo Profile Picture
    Temmy Wahyu Raharjo 2,914 on at
    RE: UTC Time to UTC Date Time object

    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).

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: UTC Time to UTC Date Time object

    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.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans