PHPackages                             kaythinks/worldtime - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kaythinks/worldtime

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kaythinks/worldtime
===================

This package helps you get the accurate time of a place

1.0.1(5y ago)1411MITPHPPHP ^7.0|^8.0CI failing

Since Dec 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/kaythinks/Worldtime)[ Packagist](https://packagist.org/packages/kaythinks/worldtime)[ RSS](/packages/kaythinks-worldtime/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (3)Used By (1)

Kaythinks/Worldtime
===================

[](#kaythinksworldtime)

This PHP Library helps you get the accurate time for any Global city
====================================================================

[](#this-php-library-helps-you-get-the-accurate-time-for-any-global-city)

There are presently 4 static methods namely;

- getTime(string $input) --This method returns the time in 12-hour Format
- getFullTime(string $input) --This method returns the time in 24-hour Format
- getTimeString(string $input) --This method returns the time as a string in 12-hour Format
- getFullTimeString(string $input) --This method returns the time as a string in 24-hour Format

To install this package follow the steps below

\-- Run composer require kaythinks/worldtime

\-- Run composer dump-autoload

\-- The library can be used this way for example;

```
