cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SymmetryLtd
Frequent Visitor

Booking System sending email confirmation in UTC and not GMT

Hi

 

I have created a booking system app using the "Book a room" template.

 

All times seem good and when the app creates the calendar entry it is in for the correct time. The issue i am having the email confirmation that comes from the resource room email address it comes though as the wrong time.

 

I've checked the details on for the 2 users in Office 365 and both are set to GMT Standard Time.

 

Any help will be very much appreciated.

 

Thanks

 

B

2 ACCEPTED SOLUTIONS

Accepted Solutions

Try this one

 

If(IsBooking,
UpdateContext({ShowLoading: true});
If(!BookForMeeting,
Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Booking", DateAdd(StartDateTime, -TimeZoneOffset(), Minutes),
DateAdd(EndDateTime, -TimeZoneOffset(), Minutes),
{TimeZone:"(UTC+00:00) Dublin, Edinburgh, Lisbon, London",RequiredAttendees:RoomsGallery.Selected.Email, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"}),

ClearCollect(RequiredAttendeesNoRoom, Split(MeetingsGallery.Selected.RequiredAttendees, ";"));
ForAll(AllRooms, RemoveIf(RequiredAttendeesNoRoom, Address = Result));
ClearCollect(RequiredAttendeesNoRoom, Concat(RequiredAttendeesNoRoom, Result & ";"));
ClearCollect(RequiredAttendeesNoRoom, Split(First(RequiredAttendeesNoRoom).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)

View solution in original post

You superstar! That has worked 😀

 

Thank you so much for all your help

View solution in original post

6 REPLIES 6
TheRobRush
Power Participant
Power Participant

Does this happen anytime the email is sent, or only when sent from specific users? If it always happen we will need to see the actual code that sends the email to advise.

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

It happens from all auto reply Room mailboxes.If i replicate what the app is doing manually then it comes across with the correct time. It's only through the app. "It think" it is the last piece code on the confirmation screen that is used for this part, but i could be wrong!

 

If(
IsBooking,
UpdateContext({ShowLoading: true});
Set(AvailableRoomsCounter, 1);
If(
!BookForMeeting,
Office365.V2CalendarPostItem(
MyCalendar,
User().FullName & "'s Booking",
StartDateTimeUTC,
EndDateTimeUTC,
{
RequiredAttendees: RoomsGallery.Selected.Email,
Location: RoomsGallery.Selected.Name,
Importance: "Normal",
ShowAs: "Busy"
}
),
ClearCollect(
RequiredAttendeesNoRoom,
Split(
MeetingsGallery.Selected.RequiredAttendees,
";"
)
);
ForAll(
AllRooms,
RemoveIf(
RequiredAttendeesNoRoom,
Address = Result
)
);
ClearCollect(
RequiredAttendeesNoRoom,
Concat(
RequiredAttendeesNoRoom,
Result & ";"
)
);
ClearCollect(
RequiredAttendeesNoRoom,
Split(
First(RequiredAttendeesNoRoom).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
),
StartDateTimeUTC,
EndDateTimeUTC,
{
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
)

 

 

 

 

 

Georgetown15x
Helper I
Helper I

Solution-

On the confirmation screen - Onvisible, change the first part of the code to the following;

If(IsBooking,
UpdateContext({ShowLoading: true});
If(!BookForMeeting,
Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Booking",

DateAdd(StartDateTime, -TimeZoneOffset(), Minutes),
DateAdd(EndDateTime, -TimeZoneOffset(), Minutes),
{TimeZone:"(UTC+10:00) Canberra, Melbourne, Sydney", >> Your Timezone

RequiredAttendees:RoomsGallery.Selected.Email, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"}),
ClearCollect....


Hi Georgetown

Thanks for this. I've put the following in to the "On visible"

 

If(
IsBooking,
UpdateContext({ShowLoading: true});
Set(AvailableRoomsCounter, 1);
If(
!BookForMeeting,
Office365.V2CalendarPostItem(
MyCalendar,
User().FullName & "'s Booking",
DateAdd(StartDateTime, -TimeZoneOffset(), Minutes),
DateAdd(EndDateTime, -TimeZoneOffset(), Minutes),
{TimeZone:"(UTC+01:00) Dublin,Edinburgh,Lisbon,London",

RequiredAttendees: RoomsGallery.Selected.Email,
Location: RoomsGallery.Selected.Name,
Importance: "Normal",
ShowAs: "Busy"
}
),

 

But i'm getting an error regarding the timezone. I've attached the screenshot

 

Thanks

 

B

Try this one

 

If(IsBooking,
UpdateContext({ShowLoading: true});
If(!BookForMeeting,
Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Booking", DateAdd(StartDateTime, -TimeZoneOffset(), Minutes),
DateAdd(EndDateTime, -TimeZoneOffset(), Minutes),
{TimeZone:"(UTC+00:00) Dublin, Edinburgh, Lisbon, London",RequiredAttendees:RoomsGallery.Selected.Email, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"}),

ClearCollect(RequiredAttendeesNoRoom, Split(MeetingsGallery.Selected.RequiredAttendees, ";"));
ForAll(AllRooms, RemoveIf(RequiredAttendeesNoRoom, Address = Result));
ClearCollect(RequiredAttendeesNoRoom, Concat(RequiredAttendeesNoRoom, Result & ";"));
ClearCollect(RequiredAttendeesNoRoom, Split(First(RequiredAttendeesNoRoom).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)

View solution in original post

You superstar! That has worked 😀

 

Thank you so much for all your help

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,029)