Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Office365Outlook.V4CalendarPostItem Time Zones for all day events

(0) ShareShare
ReportReport
Posted on by 621

Hi All - whenever I set the isallday property to true when the calendar event is created It shows as started at 8:00 PM the previous day. Can someone share what property I am missing or need to add?  Thanks in advance,

 

ctedesco3307_0-1694284571230.png

ctedesco3307_1-1694284668636.png

 

my laptop is east coast time frame - if that makes a difference. 

 

thanks 

 

  • Verified answer
    SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on at
    Re: Office365Outlook.V4CalendarPostItem Time Zones for all day events

    Hi @ctedesco3307 

     

    The API now supports time zones. What you would want to do here is not specify your Start and End as UTC (indicated by the 'Z' prefix on the end), but instead specify it in your time zone. You would then set the StartTimeZone and EndTimeZone values to "Central European Time". So something like this:

     

    This is just a example:

     

    {
     "Body": {
     "Content": "Agenda",
     "ContentType": "HTML"
     },
     "Start": "2015-01-30T00:00:00+01:00",
     "End": "2015-02-01T00:00:00+01:00",
     "ShowAs": "Busy",
     "Location": {
     "DisplayName": "Vesterbrogade"
     },
     "Subject": "Updated title",
     "IsAllDay": true,
     "StartTimeZone": "Central European Standard Time",
     "EndTimeZone": "Central European Standard Time"
    }

     

    Source: https://stackoverflow.com/questions/28982218/all-day-events-are-not-created-correctly-in-office-365

     


    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

     

  • ctedesco3307 Profile Picture
    621 on at
    Re: Office365Outlook.V4CalendarPostItem Time Zones for all day events

    @SpongYe Thanks for responding - I tried this but I still get the same error - if I don't have isallday set to true it works ok (with my original code) so that's why I referenced it ..... thx again 

     

    ctedesco3307_0-1694287246755.pngctedesco3307_1-1694287533732.png

     

  • SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on at
    Re: Office365Outlook.V4CalendarPostItem Time Zones for all day events

    Hi @ctedesco3307 

     

    The problem isn't the isallday.

    It looks like the startdate of the event:

    DateAdd(DateTimeValue(DatePicker1.SelectedDate & " " &"12"&":"&"00"&"AM"), TimeZoneOffset(),TimeUnit.Minutes)

    The TimeZoneOffset function returns the number of minutes between the user's local time and UTC (Coordinated Universal Time). Please read through the documentation here https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-dateadd-datediff

     

    I assume you want the event to start at 12:00 AM. Then you need to change the code to:

    DateTimeValue(DatePicker1.SelectedDate & " " &"12"&":"&"00"&"AM")


    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

     

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard