web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / utcNow function gives ...
Power Automate
Unanswered

utcNow function gives the wrong time

(0) ShareShare
ReportReport
Posted on by 13

I am using utcNow() function in order to populate one of my datetime fields in the Sharepoint list which is meant to give me the UTC time of when the form was submitted. 

For whatever strange reason this produces current datetime minus 8 hours so rather giving me 16:00 UTC it gives me 08:00 am.

 

Any ideas as to why this happens and how to solve this.

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @Rafal1 ,

    my first guess would be that it's due to the regional settings in SharePoint. You take utcNow() in UTC time zone, store it to SharePoint (SharePoint works always with time in UTC) and then your regional settings will convert it to UTC-8 on the SharePoint site.

  • Rafal1 Profile Picture
    13 on at

    Thank you for responding.

     

    This process follows form submission but because response datetime was giving me incorrect time, I thought that using Universal time will solve it. It is even more puzzling as I am based in UK and none of my regional settings in any of the systems would be set to minus 8 hours.

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    When you check the flow run history, Is it -8 hours already in the flow, or only after you save it into SharePoint? If it's correct in the flow but wrong in SharePoint then SharePoint is doing the conversion. If it's wrong already in the flow then there's something wrong with the flow. 🙂 

  • Rafal1 Profile Picture
    13 on at

    I have just checked, regardless whether I use utcNow() function or a form submission time (dynamic object) I always get -8 hours in my Sharepoint list. (this would be another question: Why is form submission time producing UTC time - 8 hours too? My Microsoft platform is set to UTC timezone)

    Looks like the only solution might be adding 8 hours to the UTC time (or form submission time).

     

    BTW, how can it be -8 hours in the flow? Universal time is the same wherever we are on the planet is this not the purpose of this function? To always give same time regardless who and where runs it?

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    It shouldn't be -8 in the flow, but I didn't want to completely ignore the possibility that somebody messed up that action.

    You can try to add 8 hours, but I'd rather double check the regional settings of the SharePoint site, if you store it as utcNow+8 in SharePoint then it might mess up any potential background logic in the future.

     

     

  • Rafal1 Profile Picture
    13 on at

    Rafal1_0-1626716316048.png

     

    Yes, the platform is set to UTC and as you said, I do not want to do any additional calculations not to mess anything else later.

  • Verified answer
    tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    That doesn't look like the settings of the SharePoint site where you store the date. Go to the SharePoint site where you store the date -> Settings -> Site administration: Regional settings.

    image.png

  • Rafal1 Profile Picture
    13 on at

    Thank you 🙂

     

    Rafal1_1-1626717245489.png

     

     

  • Community Power Platform Member Profile Picture
    on at

    This is f'ng ridiculous. They literally have a utcNow() function that returns a local time value based on sharepoint settings.  The function does not do what it says it does.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard