@Vivek Komarla Bhaskar Thanks for reaching out. Please correct if my understanding is right. You are making the HTTP request on your API from logic app and want to understand how you should treat the data in the logicapp.
If your data is in the any of the format then you can use the convertTimeZone function to convert the source time to the destination time and it should automatically take care for the daylight saving depending on the source and destination time zone.
@Vivek Komarla Bhaskar :
You can use the JavaScript code within a Logic App which will check whether a date is within daylight savings. If yes then you can apply the logic specific to UK (and Central Europe) i.e. n Britain and the European Union, Daylight Saving Time is called British Summer Time (BST). Non-daylight-saving time is called British Winter time (BWT). British Summer Time begins on the last Sunday in March and ends on the last Sunday of October. If it is US i.e. In most of the US, DST starts on the second Sunday of March and ends on the first Sunday of November, at 2:AM both times. The second Sunday in March will always be between the 8th and the 14th inclusive. The first Sunday in November will always be between the 1st and 7th inclusive. The day of week numbering is quite convenient because the day minus day of week will give you the previous Sunday.
Sample code for British Summer Time for determining whether a date is within daylight savings.
if(or(less(int(formatDateTime(variables('Date'), 'MM')), 3), greater(int(formatDateTime(variables('Date'), 'MM')), 10)), false, if(or(greater(int(formatDateTime(variables('Date'), 'MM')), 3), less(int(formatDateTime(variables('Date'), 'MM')), 10)), true, if(equals(int(formatDateTime(variables('Date'), 'MM')), 3), greaterOrEquals(sub(int(formatDateTime(variables('Date'), 'dd')), dayOfWeek(variables('Date'))), 25), if(equals(int(formatDateTime(variables('Date'), 'MM')), 10), less(sub(int(formatDateTime(variables('Date'), 'dd')), dayOfWeek(variables('Date'))), 25), false ))))
Hi @Vivek Komarla Bhaskar
Following up to see if my answer helps. Feel free to get back to me if you need any assistance.
Please accept as "Yes" if the answer is helpful so that it can help others in the community. If you need any help/clarification/concerns/follow up questions, then please click on "Add Comment" on my answer and provide more details.
Hi @Vivek Komarla Bhaskar
I hope the answer helps. Feel free to get back to me if you need any assistance.
Please accept as "Yes" if the answer is helpful so that it can help others in the community. If you need any help/clarification/concerns/follow up questions, then please click on "Add Comment" on my answer and provide more details.
Sign in to comment