cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jammyk
New Member

Trying to adjust for daylight savings time

Hi all,

 

I'm pretty new to the power automate platform, so I apologise if this is a simple one:

 

I've got a booking form in Forms, with a Flow taking this info and dumping it into a Sharepoint list (greater plans to follow, with emailing notifications and automatic calendar population). Most of this is easy, but Forms doesn't seem to have an option for a date and time question so I'm pulling a date and a number field together in the flow and pumping that into the list. We have plans for a number of other forms that will run into the same issue, so I'm trying to sort it once at the start.

 

My issue is that I'm in the UK, Sharepoint is set to use UK time which changes between UTC and UTC+1 in March, then back again in October. The booking form is used for things like weddings and birthday parties which are often booked 6 months or more in advance. I need to get the hour in the list to be the same number as the hour entered into the form with no conversion no matter what month is selected, but sharepoint won't accept a date without a time zone on the end.

 

I think I can create a date and time variable with the right time zone, but that needs to be different depending on the date entered. I toyed with making something work by week number, but from what I've found the change isn't always on the same week. The only way I can see to do it at the moment is to create some sort of array with a series of date ranges and apply summer time to any dates within those ranges, but I'd have to populate it as far ahead as I can and keep coming back to add to it which doesn't feel at all correct for an automated system.

 

Any help or ideas would be greatly appreciated!

 

J

1 ACCEPTED SOLUTION

Accepted Solutions
rohsh354
Community Support
Community Support

Hello,

 

I tried creating a simple flow to achieve daylight savings time changes. Please see my solution below:

 

I have created a Form with separate field to capture hour of the day, when the booking need to be made.

For example, if booking need to be done for 8th August 2020 9 AM UTC, then Booking date field will have 8th August 2020 and another number field on the form will capture the hour.

 

I am then adding a condition on the date range i.e. if date is between 29th March to October 25th, then add 1 hour to the hour field value (from form)

 

Screen1.png

 

Screen6.png

 

Screen4.png

 

Screen3.png

 

Screen2.png

 

After adding the value, pass that date + final hours to sharepoint when creating the item.

 

Screen5.png

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

View solution in original post

1 REPLY 1
rohsh354
Community Support
Community Support

Hello,

 

I tried creating a simple flow to achieve daylight savings time changes. Please see my solution below:

 

I have created a Form with separate field to capture hour of the day, when the booking need to be made.

For example, if booking need to be done for 8th August 2020 9 AM UTC, then Booking date field will have 8th August 2020 and another number field on the form will capture the hour.

 

I am then adding a condition on the date range i.e. if date is between 29th March to October 25th, then add 1 hour to the hour field value (from form)

 

Screen1.png

 

Screen6.png

 

Screen4.png

 

Screen3.png

 

Screen2.png

 

After adding the value, pass that date + final hours to sharepoint when creating the item.

 

Screen5.png

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,207)