cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AppDeveloper
Level: Powered On

Different Time Zone when I use Book a Room App

Hi,

When I tried to update meeting location with 

 

Office365.V4CalendarPatchItem()

 

the system threw a run time error "Time Zone UTC is not valid". I observed that when i book my meeting from outlook calendar it uses GMT Standard Time Zone. However, when I use Book a room app it uses UTC.

The issue is my PatchItem formula works fine on those bookings which are booked directly from Outlook(with GMT Zone) but doesn't work and get error when i try to update those meetings which are booked through Book a Room App.

How can I solve this issue?

Please note that Formula has no errors.

 

Regards

 

 
3 REPLIES 3
Highlighted
AppDeveloper
Level: Powered On

Re: Different Time Zone when I use Book a Room App

Hi,

I further tried to read the code in Book a Room app. It looks that when it saves the meeting it saves in UTC. How can I Change this behaviour to my organisation time zone? I have copied the code which runs on confirmation screen.

 

I think from line 5-13 needs attention.

 

Any help please??

Best Regards

 

Set(DateTimeRoomChange, true);
If(CalendarFromSelectMeeting, 
    Back();
    Set(CalendarFromSelectMeeting, false),


    Set(StartDateTime, DateAdd(DateSelected, DropdownStartTime.SelectedText.Minutes, Minutes));
    Set(EndDateTime, DateAdd(StartDateTime, If(DropdownStartTime.SelectedText.Minutes >= DropdownEndTime.SelectedText.Minutes, DropdownEndTime.SelectedText.Minutes + 1440 -
    DropdownStartTime.SelectedText.Minutes, DropdownEndTime.SelectedText.Minutes - DropdownStartTime.SelectedText.Minutes), Minutes));

    Set(StartDateTimeUTC, Text(DateAdd(StartDateTime, TimeZoneOffset(), Minutes), "[$-en-US]yyyy-mm-ddThh:mm") & ":00.000Z");
    Set(EndDateTimeUTC, Text(DateAdd(EndDateTime, TimeZoneOffset(), Minutes), "[$-en-US]yyyy-mm-ddThh:mm") & ":00.000Z");
    Set(StartTimeMinutes, DropdownStartTime.SelectedText.Minutes);
    Set(EndTimeMinutes, If(DropdownEndTime.SelectedText.Minutes < DropdownStartTime.SelectedText.Minutes, DropdownEndTime.SelectedText.Minutes + 24*60, DropdownStartTime.SelectedText.Minutes));

    ClearCollect(AvailableRooms, Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector, IsOrganizerOptional: true, 
    Start: StartDateTimeUTC, End: EndDateTimeUTC, MeetingDuration: DateDiff(StartDateTime, EndDateTime, Minutes),
    MinimumAttendeePercentage: "1", ActivityDomain: "Unrestricted"}));

    ClearCollect(AvailableRoomsSorted, SortByColumns(First(AvailableRooms).MeetingTimeSuggestions, "Confidence", Descending));

    ClearCollect(AvailableRoomsConcat, Concat(Filter(First(AvailableRoomsSorted).AttendeeAvailability, Availability = "Free"), Attendee.EmailAddress.Address, ","));

    ClearCollect(AvailableRoomEmails, Split(First(AvailableRoomsConcat).Value, ","));
    
    ClearCollect(AvailableRoomEmailName, AddColumns(RenameColumns(AvailableRoomEmails, "Result", "Email"), "Name", LookUp(AllRooms, Email = Address).Name));
    Back()
    
)
AppDeveloper
Level: Powered On

Re: Different Time Zone when I use Book a Room App

Hi @PowerAddict  @v-xida-msft 

 

Can you please have a look at let me know the issue and solution?

 

Best Regards

AppDeveloper
Level: Powered On

Re: Different Time Zone when I use Book a Room App

Hi All

Further to the above here is the screen shot which shows the formula as well as the error. This error only generates when i click on the button of those meetings which are booked with this App and has timeZone = UTC. This formula works fine and update the event with timeZone =  GMT Standard ( this timezone applies to meetings when i book them from outlook calendar)

 

Best Regards

PatchItem()Error.png

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,980)