PHP Classes

PHP World Clock: Display the time in different time zones

Recommend this page to a friend!
  Info   Documentation   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2025-07-28 (Less than 1 hour ago) RSS 2.0 feedNot yet rated by the usersTotal: 159 All time: 8,989 This week: 67Up
Version License PHP version Categories
worldclock 1.0.1Custom (specified...5HTML, PHP 5, Time and Date
Description 

Author

This package can display the time in different time zones.

It provides a card to use in Laravel applications that shows on a Web page the current time in one or more world time zones.

The list of time zones that it takes displays the time is configurable by passing an array with the names of those time zones.

Picture of Naif Alshaye
  Performance   Level  
Name: Naif Alshaye <contact>
Classes: 24 packages by
Country: Saudi Arabia Saudi Arabia
Age: ???
All time rank: 18566 in Saudi Arabia Saudi Arabia
Week rank: 195 Up1 in Saudi Arabia Saudi Arabia Up
Innovation award
Innovation award
Nominee: 9x

Documentation

World Clock

A Laravel Nova card to display world clock

Installation:

You can install the package in to a Laravel app that uses Nova via composer:

composer require naif/world-clock

Usage:

Add the below to app/Providers/NovaServiceProvder.php

namespace App\Providers;

[...]

use Naif\WorldClock\WorldClock;

class NovaServiceProvider extends NovaApplicationServiceProvider
{

[...]

  public function card()
  {
      return [
         (new WorldClock())
            ->timezones([
                'Asia/Tokyo',
                'Asia/Dubai',
                'America/new_york',
                'America/los_angeles',
            ])
            ->timeFormat('h:i') //Optional time format default is: 'h:i:s'
            ->updatePeriod(1000) //Optional to set updating time period in millisecond default is 1000 ms = 1 second
      ];
  }

[...]

}

<img src="https://raw.githubusercontent.com/naifalshaye/worldclock/master/screenshots/screenshot.png" width="350">

Credits

Abdullah Algethami

Support:

[email protected]

https://www.linkedin.com/in/naif

License:

The MIT License (MIT). Please see License File for more information.


Screenshots (1)  
  • screenshots/screenshot.png
  Files folder image Files (16)  
File Role Description
Files folder imagedist (2 directories)
Files folder imageresources (2 directories)
Files folder imageroutes (1 file)
Files folder imagesrc (2 files, 1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file mix-manifest.json Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file webpack.mix.js Data Auxiliary data

  Files folder image Files (16)  /  dist  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (1 file)

  Files folder image Files (16)  /  dist  /  css  
File Role Description
  Accessible without login Plain text file card.css Data Auxiliary data

  Files folder image Files (16)  /  dist  /  js  
File Role Description
  Accessible without login Plain text file card.js Data Auxiliary data

  Files folder image Files (16)  /  resources  
File Role Description
Files folder imagejs (1 file, 1 directory)
Files folder imagesass (1 file)

  Files folder image Files (16)  /  resources  /  js  
File Role Description
Files folder imagecomponents (1 file)
  Accessible without login Plain text file card.js Data Auxiliary data

  Files folder image Files (16)  /  resources  /  js  /  components  
File Role Description
  Accessible without login Plain text file Card.vue Data Auxiliary data

  Files folder image Files (16)  /  resources  /  sass  
File Role Description
  Accessible without login Plain text file card.scss Data Auxiliary data

  Files folder image Files (16)  /  routes  
File Role Description
  Accessible without login Plain text file api.php Aux. Auxiliary script

  Files folder image Files (16)  /  src  
File Role Description
Files folder imageHttp (1 directory)
  Plain text file CardServiceProvider.php Class Class source
  Plain text file WorldClock.php Class Class source

  Files folder image Files (16)  /  src  /  Http  
File Role Description
Files folder imageControllers (1 file)

  Files folder image Files (16)  /  src  /  Http  /  Controllers  
File Role Description
  Plain text file WorldClockController.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:159
This week:0
All time:8,989
This week:67Up