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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert Date/Time to P...
Power Automate
Unanswered

Convert Date/Time to Pacific Standard Time from UTC

(0) ShareShare
ReportReport
Posted on by 1,512

I have a flow that works perfectly except when adding the event to a calendar in SharePoint.

 

Even though the calendar invites is for PST it is still posting in UTC.

 

I have tried to get this code to work

 

addHours(items('Apply_to_each')['start'],1,'yyyy-MM-ddThh:mm:ss')

 

 

With lots of different +/- of the hours and no success.

 

Dorinda_0-1635428314246.png
Dorinda_0-1635428562646.png

 

Any help would be appreciated.

Categories:
I have the same question (0)
  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @Dorinda 

    there is an action called "Convert time zone", did you tried this to convert your date into your time zone?

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • Dorinda Profile Picture
    1,512 on at

    @MarvinBangert yes and still do not get good results

    Dorinda_0-1635429456539.png

     

    Start time is correct hour just wrong time of day supposed to be PM not AM

    Dorinda_1-1635429490201.png

     

     

  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @Dorinda 

    just that I understood it correctly:

    You have a calendar and whenever there is a new event added, updated or deleted in this calendar, you want to create an item in a SharePoint List, correct?

     

    I am not sure why you would need a compose, parse json and apply to each for, you should only receive one item per trigger, so there shouldn't be any array you run through and the output of your trigger is already parsed.

     

    My flow looks like this:

    Image 707.png

    The "Start" column in SharePoint is a date time column and I use the dynamic content "Start time with time zone". 

    My calendar element:

    Image 708.png

    My SharePoint item:

    Image 709.png

    My timezone is UTC+2, the information within my trigger is:

    {
     [...]
     "subject": "Test Event",
     "start": "2021-11-12T07:00:00.0000000",
     "end": "2021-11-12T07:30:00.0000000",
     "startWithTimeZone": "2021-11-12T07:00:00+00:00",
     "endWithTimeZone": "2021-11-12T07:30:00+00:00",
     [...]
    }

     

    What does happen on your side, when you build the flow like this?

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • Dorinda Profile Picture
    1,512 on at

    @MarvinBangert 

     

    Actually the meeting is being created in Outlook and the flow is adding it to the SharePoint Calendar.  It is when it is being added by the flow to SharePoint that the time conversion is a mess.

  • Dorinda Profile Picture
    1,512 on at

    @MarvinBangert so upon further review it appears the issue is with the Apply to, when you just do it straight no apply to the one meeting entry is entered correctly.

     

    Why would the apply to cause the times to be reset to a different time?

     

    I am so stuck

  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @Dorinda 

    thanks for further investing in this, but I am still not sure why do you even need an apply to each? The trigger "When an event is added, updated or deleted" runs on only one item, so your return is just one object. Where does your array and apply to each comes from or why is it necessary?

     

    Please give me some more information about, what is missing in my suggested flow with just two items, then I can further invest in helping you to find a solution.

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • Dorinda Profile Picture
    1,512 on at

    Because it is a recurring event and there are 12 months in the year, so I have it working but it is doing the wrong time

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard