Ballerina Central will undergo scheduled maintenance on Wednesday, August 06, from 00:30 AM to 01:30 AM UTC. During this time, Ballerina Central login and sign up will be temporarily disabled. We appreciate your patience as we work to improve your experience. For more information, reach out to contact@ballerina.io
 

ballerinax/worldtimeapi Ballerina library

1.5.1

Overview

This is a generated connector for WorldTimeAPI v0.6.1 OpenAPI Specification.

WorldTime API is a simple "microservice" which returns the local-time for a given timezone in both unixtime and ISO8601 format. The worldTimeAPI connector supports to get the current time based on a request with a timezone and additional information including whether that timezone is currently in Daylight Savings Time, when DST starts and ends, the UTC offset, etc.

Quickstart

  • Listing all time zone as json

Step 1 - Import connector

Copy
ballerinax/worldtimeapi

Step 2 - Create a new connector instance

Copy
worldtimeapi:Client baseClient = check new Client();

Step 3 - Invoke connector operation

  1. Invoke connector operations using the client
Copy
worldtimeapi:ListJsonResponse output = check baseClient->listTimezones();
  1. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/worldtimeapi;Copy

Other versions

See more...

Metadata

Released date: about 2 years ago

Version: 1.5.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 14

Current verison: 9


Weekly downloads


Source repository


Keywords

IT Operations/Cloud Services

Cost/Free


Contributors