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 Apps / Book a Room template -...
Power Apps
Suggested Answer

Book a Room template - Calendar invites appearing one hour ahead of requested time!

(0) ShareShare
ReportReport
Posted on by 15
**UPDATE** - I can't reply to @MichaelFP nor can I post a reply to my own post for some reason. I tried removing the TimeZoneOffset() and this made it appear in the calendar preview window correctly, but when I open the calendar invite to view the full details, it appears an hour behind when I booked it for and states the Time Zone is Co-ordinated Universal Time. How do I make it so the invite and the calendar preview window are matching?

 
**END OF UPDATE**
 
Original Post
Hello everyone,
 
I'm having a really frustrating issue with the Book A Room template Power App.
 
We've used it for some time and it has now decided for the past few weeks/months to send the meeting invites an hour ahead of the scheduled time.
 
So if it was booked for 10am, it will invite users and appear in the calendar as 11am.
 
I've done a lot of googling, tried manually adding in the (UTC+00:00) Dublin, Edinburgh, Lisbon, London" time zone etc with no luck.
 
Can someone please review the below formula and tell me what is going wrong or what needs to be changed, feeling pretty desperate at this point!
 
If(
    IsBooking,
    UpdateContext({ShowLoading: true});
    If(
        !BookForMeeting,
        Office365.V2CalendarPostItem(
            MyCalendar,
            User().FullName & "'s Booking",
            DateAdd(
                StartDateTime,
                -TimeZoneOffset(),
                TimeUnit.Minutes
            ),
            DateAdd(
                EndDateTime,
                -TimeZoneOffset(),
                TimeUnit.Minutes
            ),
            {
                RequiredAttendees: RoomsGallery.Selected.Email,
                Location: RoomsGallery.Selected.Name,
                Importance: "Normal",
                ShowAs: "Busy"
            }
        ),
        ClearCollect(
            RequiredAttendeesNoRoom,
            ForAll(
                Split(
                    MeetingsGallery.Selected.RequiredAttendees,
                    ";"
                ),
                {Result: ThisRecord.Value}
            )
        );
        ForAll(
            AllRooms,
            RemoveIf(
                RequiredAttendeesNoRoom,
                Address = Result
            )
        );
        ClearCollect(
            RequiredAttendeesNoRoom,
            Concat(
                RequiredAttendeesNoRoom,
                Result & ";"
            )
        );
        ClearCollect(
            RequiredAttendeesNoRoom,
            ForAll(
                Split(
                    First(RequiredAttendeesNoRoom).Value,
                    ";;"
                ),
                {Result: ThisRecord.Value}
            )
        );
        Set(
            RequiredAttendeesFinal,
            First(RequiredAttendeesNoRoom).Result
        );
        Set(
            RequiredAttendeesTrue,
            RoomsGallery.Selected.Email & ";" & RequiredAttendeesFinal
        );
        Office365.V2CalendarPatchItem(
            MyCalendar,
            MeetingsGallery.Selected.Id,
            If(
                MeetingsGallery.Selected.Subject = User().FullName & "'s Skype Meeting",
                User().FullName & "'s Booking",
                MeetingsGallery.Selected.Subject
            ),
            StartDateTime,
            EndDateTime,
            {
                RequiredAttendees: RequiredAttendeesTrue,
                OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees,
                Body: "Room has been updated to " & RoomsGallery.Selected.Name,
                Location: RoomsGallery.Selected.Name,
                Importance: "Normal",
                ShowAs: "Busy"
            }
        )
    );
    UpdateContext({ShowLoading: false})
);
Set(
    IsBooking,
    false
)
Categories:
I have the same question (0)
  • Suggested answer
    MichaelFP Profile Picture
    1,847 Super User 2025 Season 2 on at
    when you send the data to outlook, always send as UTC, in that case it will show the correct hour when the user see in your outlook. You are sending with the TimeZoneOffset applied.
  • MH SP Dev Profile Picture
    15 on at
    @MichaelFP sorry I can't see how to reply to your comment, but does that mean I just need to delete the "-TimeZoneOffset()" from my formula?
  • MH SP Dev Profile Picture
    15 on at
    Hey Michael,
     
    Thanks for your response.
     
    Unfortunately I'm a little lost on what you mean.
     
    I tried removing the TimeZoneOffset() lines and also changing it to DateTimeZone.UTC, but now the calendar invites appear an hour behind instead of ahead.
     
    So if I book it for 6pm it now appears in my calendar as 5pm.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard