cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Microsoft
Microsoft

Re: Trying to adjust for daylight savings time

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
Highlighted
Microsoft
Microsoft

Re: Trying to adjust for daylight savings time

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
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (11,347)