You are currently viewing Show internet base time in PowerApps
Show internet base time in powerapps

Show internet base time in PowerApps

  • Post author:
  • Post category:Power Apps
  • Reading time:7 mins read

In this post, we will learn how to show internet base time in powerapps canvas app.

We can get the local time of the user by using the function Now(), that will return the user device time and if the user change his device time the return value of the Now() function will change also to this value.

What if we have some requirements to display a time in a canvas app based on Internet Time or Server Time., to avoid changing the time in Canvas app every time the user change their time?

Show internet base time in PowerApps API

To Show internet base time in PowerApps canvas app we will create custom connector and connect to some API sites that provide the global time.

Show internet base time in PowerApps

In this video we discuss how to Create custom connector from blank to connect to the World Time API: Simple JSON/plain-text API to obtain the current time in, and related data about, a timezone.

PowerApps custom connectors can be configured to allow the use of APIs that aren’t covered by the public connectors.

PowerApps custom connectors provide a way to extend apps by calling APIs, services, and systems for scenarios tailored toward your business needs.

Steps to Show internet base time in PowerApps

  1. Open Power Apps make site in the custom connector
  2. Create Custom connector from blank
  3. Provide a name for your connector
  4. Choose http schema and in the host write the base URL worldtimeapi.org
show internet base time in powerapps
show internet base time in powerapps
  1. In Authentication type, keep it No Authentication
  2. Write the Operation ID for example in my example I named it GetcairoTime
  3. In the definition click import from sample ,choose the get verb and type your API with your country time zone as shown below
c2 | Power Platform Geeks

You can check the time zones that provide by the API from here

  1. Add default response
c3 | Power Platform Geeks
  1. and type the JSON code for your time zone in the body section and click import
c4 | Power Platform Geeks
  1. Create the custom connector and test it.
  2. Open your PowerApps Canvas app and add your custom connector
  3. Insert a label to show the response of your connector and write the following formula
DateTimeValue(CairoTime.GetcairoTime().datetime)
c5 | Power Platform Geeks
show internet base time in powerapps API

DateTimeValue to get only the date and time from the response of the custom connector

See Also
Join us
Need Help
  • Have a related question? Please ask it at deBUG.to Community.

Heba Kamal

Microsoft MVP, MCT, Technical Speaker, Blogger, and Microsoft 365 and Power Platform Consultant.