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.

 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,112)