Skip to main content

Notifications

Community site session details

Community site session details

Session Id : mNVFh21ZXYpHcPwRMvNLae
Power Automate - Building Flows
Unanswered

Convert UTCNow() to local time

Like (0) ShareShare
ReportReport
Posted on 30 Oct 2020 12:20:16 by 234

I need to add a date time to a report in local UK time based on time now.

 

UTCNow() gives me time now.  Convert time zone allows me to convert either to GMT (which happens to be the same as UTC) or to GMT+1 (which is the same as BST).

 

I have found plenty of posts  that explain that but how do I get it to convert to local time, i.e. either GMT or BST as appropriate depending on which is in force at the time?  I can't select based on date because it doesn't change on the same date every year - it always changes on a Sunday.

 

For international friends GMT - Greenwich Mean Time is the time used in the UK during the winter, BST - British Summer Time is used in the summer.  You might know it as daylight saving time.

 

More than happy with an answer that says if you want to get there I wouldn't start from here 😉 - as long as it does actually get me there!

 

Thank you very much for your help.  Guy

  • AgainOpen Profile Picture
    102 on 11 May 2023 at 13:52:55
    Re: Convert UTCNow() to local time

    Hi. I have the same problem.

     

    I created a flow to notify users when a new file is added to the library. the notification runs every day at 5:30pm and should show anything that was added UTC Now-1 (yesterday) 

    It run on the first day, and it sent me the files that were added (for testing purposes I added only a few files to a few folders - and i did that after 4:30pm) so that same day at 5:30pm I received the notification.

    on the following day i did not add any new files, yet, at 5:30 (the following day) i received the email again with the same files included. The following morning, i run the flow manually and it didn't send any notifications. the only reason I can think of, is that since we currently are in BST it is (which is UTC + 1 Hour) 

     

    So, is there a way to update UTC to local UK Time - or can i create a filter to take 25hs instead of 1 day to avoid the same notification going twice (instead of UTC-1d UTC-25Hs??)

     

    thanks 

  • JamesMoyle Profile Picture
    37 on 02 Sep 2021 at 20:27:14
    Re: Convert UTCNow() to local time

    I had the same problem but I think they may have changed the function of the Convert Time Zone widget. It now gives the option on UTC +0 London which seems to take account of BST. It certainly works for me anyway!

     

    JamesMoyle_0-1630614310629.png

  • VictorIvanidze Profile Picture
    12,214 on 02 Nov 2020 at 16:34:41
    Re: Convert UTCNow() to local time

    Hi again @GuyBoswell,

     

    as an alternative you can try to use a custom connector:

    https://docs.microsoft.com/en-us/graph/tutorials/power-automate 

  • VictorIvanidze Profile Picture
    12,214 on 02 Nov 2020 at 09:38:12
    Re: Convert UTCNow() to local time

    Hi @GuyBoswell, unfortunately I do not know a way to "read system time directly" without premium action.

    It might be someone else knows?

  • Guy Boswell Profile Picture
    234 on 02 Nov 2020 at 09:29:50
    Re: Convert UTCNow() to local time

    Hi Victor,

    Premium actions are not an option - we cannot get them with our charity account.

    Is there really no way to read system time directly?  It seems very strange.

    Thank you for your help.

    Guy

  • Guy Boswell Profile Picture
    234 on 02 Nov 2020 at 09:15:03
    Re: Convert UTCNow() to local time

    Hi Alice,

    In the UK we are either UTC+0 or UTC+1, depending whether daylight saving is in effect.

    The convert time zone step only seems to work with a fixed differential.

    Thank you for your help.

    Guy

  • VictorIvanidze Profile Picture
    12,214 on 31 Oct 2020 at 10:59:43
    Re: Convert UTCNow() to local time

    Hi @GuyBoswell,

     

    assuming your Office 365 profile contains proper time zone you can retrieve it to provide the further time conversion.

    Unfortunately to get TimeZone value you have to invoke a GRAPH request GET https://graph.microsoft.com/v1.0/me/MailboxSettings  , that requires to use a Premium action "Invoke a HTTP request".

  • v-alzhan-msft Profile Picture
    on 31 Oct 2020 at 02:30:21
    Re: Convert UTCNow() to local time

    Hi @GuyBoswell ,

     

    Does the Convert time zone works on your said to achieve the requirement?

    Could you please explain more details about the requirement? If you share an example of the expected time type in UK from the utc time, I would better understand you and provide the proper workaround for you.

     

    I suggest that you should know how many hours earlier or late between the utc time and your local UK time, then you could add or delete the hours from the utc time to get the local time.

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,751 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started