PHP code example of unofficialmc2 / synchr-ntp

1. Go to this page and download the library: Download unofficialmc2/synchr-ntp 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/ */

    

unofficialmc2 / synchr-ntp example snippets



$timestamp = time();
$DateTime1 = new DateTime();
$DateTime2 = new DateTimeImmutable();


use function \SynchroNtp\time;
use \SynchroNtp\DateTimeImmutable;
use \SynchroNtp\DateTime;
$timestamp = time();
$DateTime1 = new DateTime();
$DateTime2 = new DateTimeImmutable();