Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • MH SP Dev Profile Picture
    15 on at
    Book a Room template - Calendar invites appearing one hour ahead of requested time!
    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.
  • MH SP Dev Profile Picture
    15 on at
    Book a Room template - Calendar invites appearing one hour ahead of requested time!
    @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?
  • Suggested answer
    MichaelFP Profile Picture
    1,831 Super User 2025 Season 1 on at
    Book a Room template - Calendar invites appearing one hour ahead of requested time!
    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.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard