PHP code example of simbiat / sand-clock

1. Go to this page and download the library: Download simbiat/sand-clock library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

simbiat / sand-clock example snippets


echo \Simbiat\SandClock::format(1234567890);

echo \Simbiat\SandClock::format(1234567890, 'H:i');

echo \Simbiat\SandClock::seconds('31536050000829051');

echo \Simbiat\SandClock::seconds('31536050000829051', false);

echo \Simbiat\SandClock::seconds('31536050000829051', true, 'jp');

\Simbiat\SandClock::convertTimezone('now', 'Europe/Helsinki', 'UTC')