Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Unanswered

Why is getTimeZoneOffsetMinutes method different in JavaScript API then in ComponentFramework?

Posted on by 264

Hi, does anybody know why this method has different signature or have a workaround to get timezone offsett based on date parameter?

In JavaScript we are limited to current date and time and that might be wrong due to daylight savings. This method does not accept any parameters.

However, while working with PCF this method accepts datetime parameter and gives correct offsett based on that. Here are links to documentation on both of these:

getGlobalContext.userSettings (Client API reference) in model-driven apps - Power Apps | Microsoft Docs

getTimeZoneOffsetMinutes - Power Apps | Microsoft Docs

Thanks in advance

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,277 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,137 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans