cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Now() function provides a local machine (from where the PowerApp is browsed) time instead of server time

Hello All,

 

I'm using the Now() function in PowerApp. This function provides a local machine time on which the PowerApp is accessed instead of the server time where the PowerApp is hosted.

 

Can anyone know about this? Any help would be appreciated.

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User III
Dual Super User III

I'm not really sure what you are asking.  Yes, the Now function will return the date and time in the current timezone of the user. You can use a combination of the dateadd() and Timezoneoffset() functions to get the current time in UTC (Universal Timecode).

 

DateAdd(Now(),TimeZoneOffset(Now()))



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

4 REPLIES 4
Dual Super User III
Dual Super User III

I'm not really sure what you are asking.  Yes, the Now function will return the date and time in the current timezone of the user. You can use a combination of the dateadd() and Timezoneoffset() functions to get the current time in UTC (Universal Timecode).

 

DateAdd(Now(),TimeZoneOffset(Now()))



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

@Anonymous 

As @Pstork1 mentioned, the Now() function is local machine time.  

Are you trying to get some other time?  If you need world time, you can always put a custom connector to WorldTime in your App and get the time from there (I'm sure there are others as well you can use).

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Frequent Visitor

I am facing a similar issue where some users are changing their local machine's time to overcome the validation checks that I am using in Powerapps.
Is there no workaround rather than using a custom connector?

Super User III
Super User III

@Naval_Verma 

Here is a simple workaround...

Create a record in a SharePoint list, then get its created date/time.

   Set(systemDate, Patch(someList, Defaults(someList), {Title:"something"}).Created)

 

Even though you would have to do this each time to get the correct date/time, what I have done with it is actually just calculate the difference from Now() to the above and then use that in all date/time calculations.

ex.

   Set(localTimeOffset, DateDiff(Now(), Patch(someList, Defaults(someList), {Title:"something"}).Created, Minutes)  )

 

Later...

    DateAdd(Now(), localTimeOffset, Minutes)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (51,829)