PHP code example of fzed51 / synchr-ntp

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

    

fzed51 / 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();