PHP Classes

PHP Timezone Select List: Show a form input to let the user pick a timezone

Recommend this page to a friend!
  Info   Example   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 54 All time: 10,612 This week: 69Up
Version License PHP version Categories
selecttz 1.0Freeware8HTML, Code Generation, PHP 8
Description 

Author

This package can show a form input to let the user pick a timezone.

It can generate HTML for a form select input with a list of time zones from many countries worldwide.

The package can return the generated HTML to be inserted in form.

The identifier and other HTML attributes of the generated select input are configurable.

Picture of ASCOOS CMS
  Performance   Level  
Innovation award
Innovation award
Nominee: 8x

 

Example

<?php
require_once('..\kernel\coreTimezones.php');

$objTZ = new \ASCOOS\CMS\KERNEL\CORE\Timezones\TTimezonesHandler();

$params = [
   
'class="default"',
   
'data-role="timezones"'
];

?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>ASCOOS - Test timezones select box</title>
   
    <link rel="icon" href="../favicon.ico" />
  </head>

  <body>
    <form>
        <label for="timezones">Choose a PHP Timezone:</label>
        <?php
          $start
= microtime(true);
          echo
$objTZ->getHtmlSelect('timezones', $params);
         
$profile_ascoos = number_format(microtime(true) - $start, 25);
          unset(
$start);
         
?>
</form>
    <div>
      <p>The list of timezones was created in : <?php echo $profile_ascoos; unset($profile_ascoos); ?></p>
    </div>
  </body>
</html>


Details

<p align="center"><img src="https://dl.ascoos.com/images/ascoos.png" height=120 /></p>

selectTZ

Description

Create an dropdown select with Timezones.

*

<p align="center"><img src="https://github.com/ascoos/selectTZ/blob/main/screenshot/select-timezones.png" height=584 /></p>

<p align="center"><img src="https://github.com/ascoos/selectTZ/blob/main/screenshot/select-timezones-generated-html-code.png" /></p>


Screenshots (5)  
  • screenshot/select-timezones-1.png
  • screenshot/select-timezones-Firefox-1.png
  • screenshot/select-timezones-Firefox.png
  • screenshot/select-timezones-generated-html-code.png
  • screenshot/select-timezones.png
  Files folder image Files (11)  
File Role Description
Files folder imagescreenshot (1 file)
Files folder imagesrc (2 directories)
Accessible without login Plain text file README.md Doc. Documentation

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:54
This week:0
All time:10,612
This week:69Up